ollama

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Model      string
	BaseURL    string
	Timeout    time.Duration
	MaxRetries int
	Dimension  int
}

type EmbeddingRequest

type EmbeddingRequest struct {
	Model string `json:"model"`
	Input string `json:"input"`
}

type EmbeddingResponse

type EmbeddingResponse struct {
	Embeddings [][]float32 `json:"embeddings"`
}

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

type Provider

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

func New

func New(config Config) (*Provider, error)

func (*Provider) Dimension

func (p *Provider) Dimension() int

func (*Provider) Embed

func (p *Provider) Embed(ctx context.Context, texts []string) ([][]float32, error)

Jump to

Keyboard shortcuts

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