ollama

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2025 License: AGPL-3.0 Imports: 9 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 func(o *Ollama)

func WithBaseURL

func WithBaseURL(baseURL string) Config

func WithDimensions

func WithDimensions(dimensions uint32) Config

func WithHTTPClient

func WithHTTPClient(httpClient *http.Client) Config

type Ollama

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

func New

func New(model string, config ...Config) *Ollama

func (*Ollama) Dimensions

func (o *Ollama) Dimensions() uint32

func (*Ollama) GenerateEmbeddings

func (o *Ollama) GenerateEmbeddings(ctx context.Context, data string) ([]float32, error)

func (*Ollama) ModelName

func (o *Ollama) ModelName() string

func (*Ollama) PullModel

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

Jump to

Keyboard shortcuts

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