Documentation
¶
Index ¶
- type Provider
- func (p *Provider) Generate(ctx context.Context, opts *core.GenerateOptions) (*core.Message, error)
- func (p *Provider) GenerateStream(ctx context.Context, opts *core.GenerateOptions) (<-chan *core.Message, <-chan string, <-chan error)
- func (p *Provider) GetCapabilities(ctx context.Context) (*core.Capabilities, error)
- func (p *Provider) UseModel(ctx context.Context, model *core.Model) error
- type ProviderOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements the LLMProvider interface for Ollama
func NewProvider ¶
func NewProvider(opts *ProviderOpts) *Provider
NewProvider creates a new Ollama provider
TODO: - need to handle base URL better (with trailing slashes, etc.) - need to construct actual URL using baseURL, port, etc.
func (*Provider) GenerateStream ¶
func (p *Provider) GenerateStream(ctx context.Context, opts *core.GenerateOptions) (<-chan *core.Message, <-chan string, <-chan error)
GenerateStream streams the response token by token
func (*Provider) GetCapabilities ¶
Click to show internal directories.
Click to hide internal directories.