Documentation
¶
Index ¶
- type Chatter
- func (o *Chatter) BuildSession(request *domain.ChatRequest, raw bool, announceNewSession bool) (session *fsdb.Session, err error)
- func (o *Chatter) NeedsRawMode() bool
- func (o *Chatter) Send(ctx context.Context, request *domain.ChatRequest, opts *domain.ChatOptions) (session *fsdb.Session, err error)
- type PluginRegistry
- func (o *PluginRegistry) Configure() (err error)
- func (o *PluginRegistry) ConfigureVendors()
- func (o *PluginRegistry) GetChatter(model string, modelContextLength int, vendorName string, stream bool, ...) (ret *Chatter, err error)
- func (o *PluginRegistry) GetModels() (ret *ai.VendorsModels, err error)
- func (o *PluginRegistry) ListVendors(out io.Writer) error
- func (o *PluginRegistry) SaveEnvFile() (err error)
- func (o *PluginRegistry) Setup() (err error)
- func (o *PluginRegistry) SetupVendor(vendorName string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chatter ¶
func NewChatter ¶ added in v1.4.514
NewChatter returns a Chatter without a vendor, for BuildSession only. Use GetChatter to get a Chatter that can Send.
func (*Chatter) BuildSession ¶
func (o *Chatter) BuildSession( request *domain.ChatRequest, raw bool, announceNewSession bool) (session *fsdb.Session, err error)
BuildSession prints a notice for a new named session when announceNewSession is true.
func (*Chatter) NeedsRawMode ¶ added in v1.4.514
NeedsRawMode tells if the vendor needs raw mode for the model. It tests o.model, not opts.Model. GetChatter sets o.model to the vendor's spelling of the name.
type PluginRegistry ¶
type PluginRegistry struct {
Db *fsdb.Db
VendorManager *ai.VendorsManager
VendorsAll *ai.VendorsManager
Defaults *tools.Defaults
PatternsLoader *tools.PatternsLoader
CustomPatterns *custom_patterns.CustomPatterns
YouTube *youtube.YouTube
Language *lang.Language
Jina *jina.Client
Keenable *keenable.Client
Serply *serply.Client
Firecrawl *firecrawl.Client
SearchApi *searchapi.Client
Sofya *sofya.Client
Spotify *spotify.Spotify
TemplateExtensions *template.ExtensionManager
Strategies *strategy.StrategiesManager
// contains filtered or unexported fields
}
func NewPluginRegistry ¶
func NewPluginRegistry(db *fsdb.Db) (ret *PluginRegistry, err error)
func (*PluginRegistry) Configure ¶
func (o *PluginRegistry) Configure() (err error)
Configure buildClient VendorsController based on the environment variables
func (*PluginRegistry) ConfigureVendors ¶
func (o *PluginRegistry) ConfigureVendors()
func (*PluginRegistry) GetChatter ¶
func (*PluginRegistry) GetModels ¶
func (o *PluginRegistry) GetModels() (ret *ai.VendorsModels, err error)
func (*PluginRegistry) ListVendors ¶
func (o *PluginRegistry) ListVendors(out io.Writer) error
func (*PluginRegistry) SaveEnvFile ¶
func (o *PluginRegistry) SaveEnvFile() (err error)
func (*PluginRegistry) Setup ¶
func (o *PluginRegistry) Setup() (err error)
func (*PluginRegistry) SetupVendor ¶
func (o *PluginRegistry) SetupVendor(vendorName string) (err error)