Documentation
¶
Index ¶
Constants ¶
View Source
const ProviderModelSeparator = "/"
ProviderModelSeparator is the the separator between a provider and a model.
Variables ¶
View Source
var Providers = map[string]Provider{}
Providers holds a register of all providers.
Functions ¶
Types ¶
type InjectToken ¶
type InjectToken interface {
// SetToken sets an access token to be used to authenticate a remote API.
SetToken(token string)
}
InjectToken is a provider that needs an access token to authenticate a remote API.
type Loader ¶ added in v0.5.0
type Loader interface {
// Load loads the given model.
Load(modelIdentifier string) error
// Unload unloads the given model.
Unload(modelIdentifier string) error
}
Loader is a provider that is able to load and unload models.
type Provider ¶
type Provider interface {
// Available checks if the provider is ready to be used.
// This might include checking for an installation or making sure an API access token is valid.
Available(logger *log.Logger) (err error)
// ID returns the unique ID of this provider.
ID() (id string)
// Models returns which models are available to be queried via this provider.
Models() (models []model.Model, err error)
}
Provider defines a provider to query models such as LLMs.
Click to show internal directories.
Click to hide internal directories.