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)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Verbose controls the verbosity of the chain execution. Verbose = false // ErrMultipleInputs is returned when calling a chain with more than one expected input is not supported. ErrMultipleInputs = errors.New("no support for calling a chain with more than one expected input") // ErrMultipleOutputs is returned when calling a chain with more than one expected output is not supported. ErrMultipleOutputs = errors.New("no support for calling a chain with more than one expected output") // ErrMultipleOutputs is returned when calling a chain with more than one expected output is not supported. ErrWrongOutputType = errors.New("no support for calling a chain with non string return type") )
Functions ¶
func BatchCall ¶ added in v0.0.14
func BatchCall(ctx context.Context, chain schema.Chain, inputs []schema.ChainValues) ([]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.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
_examples
|
|
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 |
Packet memory contains implementations for managing conversation data
|
Packet memory contains implementations for managing conversation data |
Click to show internal directories.
Click to hide internal directories.