Documentation ¶
Overview ¶
Package golc provides functions for executing chains.
Index ¶
- Variables
- func BatchCall(ctx context.Context, chain schema.Chain, inputs []schema.ChainValues, ...) ([]schema.ChainValues, error)
- func Call(ctx context.Context, chain schema.Chain, inputs schema.ChainValues, ...) (schema.ChainValues, error)
- func SimpleCall(ctx context.Context, chain schema.Chain, input any, ...) (string, error)
- type BatchCallOptions
- type CallOptions
- type SimpleCallOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Verbose controls the verbosity of the chain execution. Verbose = false )
Functions ¶
func BatchCall ¶ added in v0.0.14
func BatchCall(ctx context.Context, chain schema.Chain, inputs []schema.ChainValues, optFns ...func(*BatchCallOptions)) ([]schema.ChainValues, error)
BatchCall executes multiple calls to the chain.Call function concurrently and collects the results in the same order as the inputs. It utilizes the errgroup package to manage the concurrent execution and handle any errors that may occur.
func Call ¶ added in v0.0.14
func Call(ctx context.Context, chain schema.Chain, inputs schema.ChainValues, optFns ...func(*CallOptions)) (schema.ChainValues, error)
Call executes a chain with multiple inputs. It returns the outputs of the chain or an error, if any.
func SimpleCall ¶ added in v0.0.14
func SimpleCall(ctx context.Context, chain schema.Chain, input any, optFns ...func(*SimpleCallOptions)) (string, error)
SimpleCall executes a chain with a single input and a single output. It returns the output value as a string or an error, if any.
Types ¶
type BatchCallOptions ¶ added in v0.0.22
type CallOptions ¶ added in v0.0.22
Directories ¶
Path | Synopsis |
---|---|
Package agent provides functionality for creating and managing agents that leverage Large Language Models (LLMs) to make informed decisions and take actions.
|
Package agent provides functionality for creating and managing agents that leverage Large Language Models (LLMs) to make informed decisions and take actions. |
Package callback provides utilities for implementing callbacks.
|
Package callback provides utilities for implementing callbacks. |
Package chain enables the creation and execution of chains, which are sequences of calls to LLMs or other utilities.
|
Package chain enables the creation and execution of chains, which are sequences of calls to LLMs or other utilities. |
Package documentloader provides functionality for loading and processing documents.
|
Package documentloader provides functionality for loading and processing documents. |
Package embedding contains the implementation to create vector embeddings from text using different APIs
|
Package embedding contains the implementation to create vector embeddings from text using different APIs |
Package evaluation provides utilities for evaluating and assessing the performance of generative models.
|
Package evaluation provides utilities for evaluating and assessing the performance of generative models. |
examples
|
|
Package integration provides utilities for integration with external systems, services, and frameworks.
|
Package integration provides utilities for integration with external systems, services, and frameworks. |
ai21
Package ai21 provides a client for interacting with the ai21 text completion API.
|
Package ai21 provides a client for interacting with the ai21 text completion API. |
ernie
Package ernie provides a client library for interacting with the Ernie API, which offers natural language processing (NLP) capabilities, including chat completion and text embedding.
|
Package ernie provides a client library for interacting with the Ernie API, which offers natural language processing (NLP) capabilities, including chat completion and text embedding. |
nbformat
Package nbformat provides utilities to read and parse Jupyter Notebook (nbformat) files.
|
Package nbformat provides utilities to read and parse Jupyter Notebook (nbformat) files. |
sqldb
Package sqldb provides an SQL database abstraction for performing queries and interacting with the database.
|
Package sqldb provides an SQL database abstraction for performing queries and interacting with the database. |
internal
|
|
deepcopy
Package deepcopy provides a function for creating deep copies of values.
|
Package deepcopy provides a function for creating deep copies of values. |
util
Package util provides utility functions and helpers.
|
Package util provides utility functions and helpers. |
Package memory contains implementations for managing conversation data and facilitating the persistence of state between chain or agent calls.
|
Package memory contains implementations for managing conversation data and facilitating the persistence of state between chain or agent calls. |
Package model provides functionalities for working with Large Language Models (LLMs).
|
Package model provides functionalities for working with Large Language Models (LLMs). |
chatmodel
Package chatmodel provides a framework for working with chat-based large language models (LLMs).
|
Package chatmodel provides a framework for working with chat-based large language models (LLMs). |
llm
Package llm provides functionalities for working with Large Language Models (LLMs).
|
Package llm provides functionalities for working with Large Language Models (LLMs). |
Package moderation provides moderation capabilities using different nlp services.
|
Package moderation provides moderation capabilities using different nlp services. |
Package outputparser provides utilities for parsing and processing the output generated by LLMs and other tools.
|
Package outputparser provides utilities for parsing and processing the output generated by LLMs and other tools. |
Package prompt provides utilities for managing and optimizing prompts.
|
Package prompt provides utilities for managing and optimizing prompts. |
Package rag provides functionality for Retrieval-Augmented Generation (RAG).
|
Package rag provides functionality for Retrieval-Augmented Generation (RAG). |
Package retriever provides functionality for retrieving relevant documents using various services.
|
Package retriever provides functionality for retrieving relevant documents using various services. |
Package schema defines the data structures and types used in GoLC.
|
Package schema defines the data structures and types used in GoLC. |
Package textsplitter provides utilities for splitting and processing text.
|
Package textsplitter provides utilities for splitting and processing text. |
Package texttospeech provides functionality for synthesizing text into audio streams.
|
Package texttospeech provides functionality for synthesizing text into audio streams. |
Package tokenizer provides utilities for tokenizing text.
|
Package tokenizer provides utilities for tokenizing text. |
Package tool provides tools that agents can use to perform various operations.
|
Package tool provides tools that agents can use to perform various operations. |
Package toolkit provides a collection of tools.
|
Package toolkit provides a collection of tools. |
Package vectorstore provides functionality for storing and managing vector embeddings.
|
Package vectorstore provides functionality for storing and managing vector embeddings. |
Click to show internal directories.
Click to hide internal directories.