Documentation
¶
Index ¶
- type AnthropicProvider
- type GatewayProxyProvider
- func (p *GatewayProxyProvider) BaseURL() string
- func (p *GatewayProxyProvider) DefaultModel() string
- func (p *GatewayProxyProvider) Models(ctx context.Context) ([]string, error)
- func (p *GatewayProxyProvider) Name() string
- func (p *GatewayProxyProvider) Stream(ctx context.Context, model string, history []Message, tools []ToolSpec) (<-chan StreamChunk, error)
- type Message
- type OllamaProvider
- type Provider
- type Registry
- func (r *Registry) Active() Provider
- func (r *Registry) ActiveName() string
- func (r *Registry) AllModels(ctx context.Context) map[string][]string
- func (r *Registry) Get(name string) Provider
- func (r *Registry) List() []string
- func (r *Registry) Register(p Provider)
- func (r *Registry) Switch(name string) error
- type StreamChunk
- type ToolCall
- type ToolSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnthropicProvider ¶
type AnthropicProvider struct {
// contains filtered or unexported fields
}
func NewAnthropicProvider ¶
func NewAnthropicProvider(cfg config.GatewayConfig) *AnthropicProvider
func (*AnthropicProvider) Models ¶
func (p *AnthropicProvider) Models(ctx context.Context) ([]string, error)
func (*AnthropicProvider) Name ¶
func (p *AnthropicProvider) Name() string
func (*AnthropicProvider) Stream ¶
func (p *AnthropicProvider) Stream(ctx context.Context, model string, history []Message, tools []ToolSpec) (<-chan StreamChunk, error)
type GatewayProxyProvider ¶
type GatewayProxyProvider struct {
// contains filtered or unexported fields
}
func NewGatewayProxyProvider ¶
func NewGatewayProxyProvider(name string, cfg config.GatewayConfig) *GatewayProxyProvider
func (*GatewayProxyProvider) BaseURL ¶
func (p *GatewayProxyProvider) BaseURL() string
func (*GatewayProxyProvider) DefaultModel ¶
func (p *GatewayProxyProvider) DefaultModel() string
func (*GatewayProxyProvider) Models ¶
func (p *GatewayProxyProvider) Models(ctx context.Context) ([]string, error)
func (*GatewayProxyProvider) Name ¶
func (p *GatewayProxyProvider) Name() string
func (*GatewayProxyProvider) Stream ¶
func (p *GatewayProxyProvider) Stream(ctx context.Context, model string, history []Message, tools []ToolSpec) (<-chan StreamChunk, error)
type OllamaProvider ¶
type OllamaProvider struct {
// contains filtered or unexported fields
}
func NewOllamaProvider ¶
func NewOllamaProvider(host string) (*OllamaProvider, error)
func (*OllamaProvider) Models ¶
func (o *OllamaProvider) Models(ctx context.Context) ([]string, error)
func (*OllamaProvider) Name ¶
func (o *OllamaProvider) Name() string
func (*OllamaProvider) Stream ¶
func (o *OllamaProvider) Stream(ctx context.Context, model string, history []Message, tools []ToolSpec) (<-chan StreamChunk, error)
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) ActiveName ¶
type StreamChunk ¶
Click to show internal directories.
Click to hide internal directories.