Documentation
¶
Index ¶
- type OllamaEmbeddingProvider
- func (o *OllamaEmbeddingProvider) BatchSize() int
- func (o *OllamaEmbeddingProvider) Dimensions() int
- func (o *OllamaEmbeddingProvider) EmbedChunks(ctx context.Context, chunks []provider.EmbedRequest) provider.BatchEmbedResult
- func (o *OllamaEmbeddingProvider) EmbedQuery(ctx context.Context, query string) []float32
- func (o *OllamaEmbeddingProvider) MaxTokens() int
- func (o *OllamaEmbeddingProvider) Name() string
- func (o *OllamaEmbeddingProvider) Validate(ctx context.Context) error
- type OllamaLLMProvider
- func (o *OllamaLLMProvider) Call(ctx context.Context, req provider.LLMRequest) (*provider.LLMResult, *provider.LLMError)
- func (o *OllamaLLMProvider) Name() string
- func (o *OllamaLLMProvider) Stream(ctx context.Context, req provider.LLMRequest, onChunk func(string)) (*provider.LLMResult, *provider.LLMError)
- func (o *OllamaLLMProvider) Validate(ctx context.Context) error
- type OllamaModelSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OllamaEmbeddingProvider ¶
type OllamaEmbeddingProvider struct {
// contains filtered or unexported fields
}
OllamaEmbeddingProvider implements the EmbeddingProvider interface for Ollama
func NewOllamaEmbeddingProvider ¶
func NewOllamaEmbeddingProvider(model string, dimensions int, baseURL string) (*OllamaEmbeddingProvider, error)
NewOllamaEmbeddingProvider creates a new Ollama embedding provider
func (*OllamaEmbeddingProvider) BatchSize ¶
func (o *OllamaEmbeddingProvider) BatchSize() int
BatchSize returns the maximum batch size
func (*OllamaEmbeddingProvider) Dimensions ¶
func (o *OllamaEmbeddingProvider) Dimensions() int
Dimensions returns the embedding vector dimensions
func (*OllamaEmbeddingProvider) EmbedChunks ¶
func (o *OllamaEmbeddingProvider) EmbedChunks(ctx context.Context, chunks []provider.EmbedRequest) provider.BatchEmbedResult
EmbedChunks embeds multiple chunks in a batch
func (*OllamaEmbeddingProvider) EmbedQuery ¶
func (o *OllamaEmbeddingProvider) EmbedQuery(ctx context.Context, query string) []float32
EmbedQuery embeds a single query for search
func (*OllamaEmbeddingProvider) MaxTokens ¶
func (o *OllamaEmbeddingProvider) MaxTokens() int
MaxTokens returns the maximum token limit for the model
func (*OllamaEmbeddingProvider) Name ¶
func (o *OllamaEmbeddingProvider) Name() string
Name returns the provider name
type OllamaLLMProvider ¶
type OllamaLLMProvider struct {
// contains filtered or unexported fields
}
OllamaLLMProvider implements the LLMProvider interface for Ollama
func NewOllamaLLMProvider ¶
func NewOllamaLLMProvider(model, fallbackModel, baseURL string) (*OllamaLLMProvider, error)
NewOllamaLLMProvider creates a new Ollama LLM provider
func (*OllamaLLMProvider) Call ¶
func (o *OllamaLLMProvider) Call(ctx context.Context, req provider.LLMRequest) (*provider.LLMResult, *provider.LLMError)
Call makes a non-streaming LLM request
func (*OllamaLLMProvider) Name ¶
func (o *OllamaLLMProvider) Name() string
Name returns the provider name
type OllamaModelSpec ¶
OllamaModelSpec holds default specifications for an Ollama embedding model