Documentation ¶
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 = false ErrMultipleInputs = errors.New("no support for calling a chain with more than one expected input") ErrMultipleOutputs = errors.New("no support for calling a chain with more than one expected output") 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 embeddings contains the implementation for creating vector embeddings from text using different APIs
|
Package embeddings contains the implementation for creating vector embeddings from text using different APIs |
Click to show internal directories.
Click to hide internal directories.