Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEmptyResponse is returned when the local LLM binary returns an empty response. ErrEmptyResponse = errors.New("no response") // ErrMissingBin is returned when the LOCAL_LLM_BIN environment variable is not set. ErrMissingBin = errors.New("missing the local LLM binary path, set the LOCAL_LLM_BIN environment variable") )
Functions ¶
This section is empty.
Types ¶
type LLM ¶
LLM is a local LLM implementation.
func (*LLM) GenerateContent ¶ added in v0.1.4
func (o *LLM) GenerateContent(ctx context.Context, messages []llms.MessageContent, options ...llms.CallOption) (*llms.ContentResponse, error)
GenerateContent implements the Model interface.
type Option ¶
type Option func(*options)
func WithArgs ¶
WithArgs passes the CLI arguments to the local LLM binary. If not set, then will be used the LOCAL_LLM_ARGS environment variable.
func WithBin ¶
WithBin passes the path to the local LLM binary to the client. If not set, then will be used the LOCAL_LLM_BIN environment variable.
func WithGlobalAsArgs ¶
func WithGlobalAsArgs() Option
WithGlobalAsArgs passes the CLI arguments to the local LLM binary formed from global llms.Options.
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
localclient
Package localclient provides a client for local LLMs.
|
Package localclient provides a client for local LLMs. |
Click to show internal directories.
Click to hide internal directories.