Documentation
¶
Index ¶
- type CreateEmbeddingRequest
- type CreateEmbeddingResponse
- type OllamaClient
- type OllamaEmbeddingFunction
- func (e *OllamaEmbeddingFunction) EmbedDocuments(ctx context.Context, documents []string) ([]*types.Embedding, error)
- func (e *OllamaEmbeddingFunction) EmbedQuery(ctx context.Context, document string) (*types.Embedding, error)
- func (e *OllamaEmbeddingFunction) EmbedRecords(ctx context.Context, records []*types.Record, force bool) error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateEmbeddingRequest ¶
func (*CreateEmbeddingRequest) JSON ¶
func (c *CreateEmbeddingRequest) JSON() (string, error)
type CreateEmbeddingResponse ¶
type CreateEmbeddingResponse struct {
Embedding []float32 `json:"embedding"`
}
type OllamaClient ¶
type OllamaClient struct { BaseURL string Model string Client *http.Client DefaultHeaders map[string]string }
func NewOllamaClient ¶
func NewOllamaClient(opts ...Option) (*OllamaClient, error)
type OllamaEmbeddingFunction ¶
type OllamaEmbeddingFunction struct {
// contains filtered or unexported fields
}
func NewOllamaEmbeddingFunction ¶
func NewOllamaEmbeddingFunction(option ...Option) (*OllamaEmbeddingFunction, error)
func (*OllamaEmbeddingFunction) EmbedDocuments ¶
func (*OllamaEmbeddingFunction) EmbedQuery ¶
func (*OllamaEmbeddingFunction) EmbedRecords ¶
Click to show internal directories.
Click to hide internal directories.