providers

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OllamaProvider

type OllamaProvider struct {
	// contains filtered or unexported fields
}

OllamaProvider implements the LLMProvider interface for Ollama

func NewOllamaProvider

func NewOllamaProvider(host string) *OllamaProvider

NewOllamaProvider creates a new Ollama provider

func (*OllamaProvider) Complete

Complete generates a completion

func (*OllamaProvider) Generate

func (o *OllamaProvider) Generate(ctx context.Context, prompt, model string) (string, error)

Generate generates text (non-chat completion)

func (*OllamaProvider) IsConfigured

func (o *OllamaProvider) IsConfigured() bool

IsConfigured returns whether the provider is configured

func (*OllamaProvider) ListModels

func (o *OllamaProvider) ListModels(ctx context.Context) ([]string, error)

ListModels returns available models

func (*OllamaProvider) Name

func (o *OllamaProvider) Name() string

Name returns the provider name

func (*OllamaProvider) PullModel

func (o *OllamaProvider) PullModel(ctx context.Context, modelName string) error

PullModel pulls a model from Ollama registry

func (*OllamaProvider) Stream

func (o *OllamaProvider) Stream(ctx context.Context, req ai.CompletionRequest) (<-chan string, error)

Stream generates a streaming completion

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL