Documentation
¶
Index ¶
- type Vendor
- type VendorsManager
- func (o *VendorsManager) AddVendors(vendors ...Vendor)
- func (o *VendorsManager) Clear(vendors ...Vendor)
- func (o *VendorsManager) Configure() (err error)
- func (o *VendorsManager) FindByName(name string) Vendor
- func (o *VendorsManager) GetModels() (ret *VendorsModels, err error)
- func (o *VendorsManager) HasVendors() bool
- func (o *VendorsManager) Setup() (ret map[string]Vendor, err error)
- func (o *VendorsManager) SetupFillEnvFileContent(envFileContent *bytes.Buffer)
- func (o *VendorsManager) SetupVendor(vendorName string, configuredVendors map[string]Vendor) (err error)
- type VendorsModels
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Vendor ¶
type Vendor interface {
plugins.Plugin
ListModels() ([]string, error)
SendStream([]*chat.ChatCompletionMessage, *domain.ChatOptions, chan string) error
Send(context.Context, []*chat.ChatCompletionMessage, *domain.ChatOptions) (string, error)
NeedsRawMode(modelName string) bool
}
type VendorsManager ¶
type VendorsManager struct {
*plugins.PluginBase
Vendors []Vendor
VendorsByName map[string]Vendor
Models *VendorsModels
}
func NewVendorsManager ¶
func NewVendorsManager() *VendorsManager
func (*VendorsManager) AddVendors ¶
func (o *VendorsManager) AddVendors(vendors ...Vendor)
func (*VendorsManager) Clear ¶
func (o *VendorsManager) Clear(vendors ...Vendor)
func (*VendorsManager) Configure ¶
func (o *VendorsManager) Configure() (err error)
func (*VendorsManager) FindByName ¶
func (o *VendorsManager) FindByName(name string) Vendor
func (*VendorsManager) GetModels ¶
func (o *VendorsManager) GetModels() (ret *VendorsModels, err error)
func (*VendorsManager) HasVendors ¶
func (o *VendorsManager) HasVendors() bool
func (*VendorsManager) SetupFillEnvFileContent ¶
func (o *VendorsManager) SetupFillEnvFileContent(envFileContent *bytes.Buffer)
func (*VendorsManager) SetupVendor ¶
func (o *VendorsManager) SetupVendor(vendorName string, configuredVendors map[string]Vendor) (err error)
type VendorsModels ¶
type VendorsModels struct {
*util.GroupsItemsSelectorString
}
func NewVendorsModels ¶
func NewVendorsModels() *VendorsModels
func (*VendorsModels) PrintWithVendor ¶ added in v1.4.283
func (o *VendorsModels) PrintWithVendor(shellCompleteList bool, defaultVendor, defaultModel string)
PrintWithVendor prints models including their vendor on each line. When shellCompleteList is true, output is suitable for shell completion. Default vendor and model are highlighted with an asterisk.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package bedrock provides a plugin to use Amazon Bedrock models.
|
Package bedrock provides a plugin to use Amazon Bedrock models. |
Click to show internal directories.
Click to hide internal directories.