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 in GoLC applications.
|
Package callback provides utilities for implementing callbacks in GoLC applications. |
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 in GoLC applications.
|
Package documentloader provides functionality for loading and processing documents in GoLC applications. |
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 in GoLC applications.
|
Package evaluation provides utilities for evaluating and assessing the performance of generative models in GoLC applications. |
examples
|
|
Package integration provides utilities for integrating GoLC with external systems, services, and frameworks.
|
Package integration provides utilities for integrating GoLC with external systems, services, and frameworks. |
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 functionalities for working with Large Language Models (LLMs).
|
Package chatmodel provides functionalities for working with 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 outputparser provides utilities for parsing and processing the output generated by LLMs and other tools in GoLC applications.
|
Package outputparser provides utilities for parsing and processing the output generated by LLMs and other tools in GoLC applications. |
Package prompt provides utilities for managing and optimizing prompts in GoLC applications.
|
Package prompt provides utilities for managing and optimizing prompts in GoLC applications. |
Package rag provides functionality for Retrieval-Augmented Generation (RAG) in GoLC applications.
|
Package rag provides functionality for Retrieval-Augmented Generation (RAG) in GoLC applications. |
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 applications.
|
Package schema defines the data structures and types used in GoLC applications. |
Package textsplitter provides utilities for splitting and processing text in GoLC applications.
|
Package textsplitter provides utilities for splitting and processing text in GoLC applications. |
Package tokenizer provides utilities for tokenizing text in GoLC applications.
|
Package tokenizer provides utilities for tokenizing text in GoLC applications. |
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 util provides utility functions and helpers for use in GoLC applications.
|
Package util provides utility functions and helpers for use in GoLC applications. |
Package vectorstore provides functionality for storing and managing vector embeddings in GoLC applications.
|
Package vectorstore provides functionality for storing and managing vector embeddings in GoLC applications. |
Click to show internal directories.
Click to hide internal directories.