ollama

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dimension

func Dimension(model string) (int, error)

Dimension returns the dimension of the model.

Types

type Ollama

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

Ollama wraps the Ollama client.

func New

func New(addr string) *Ollama

New returns a new Ollama.

func (*Ollama) Embed

func (o *Ollama) Embed(ctx context.Context, modelName, prompt string) ([]float32, error)

Embed creates embeddings.

func (*Ollama) PullModel

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

PullModel pulls a model.

Jump to

Keyboard shortcuts

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