ollama

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 17 Imported by: 30 modules, 34 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Embedder added in v0.1.2

func Embedder(g *genkit.Genkit, serverAddress string) ai.Embedder

Embedder returns the ai.Embedder with the given server address. It returns nil if the embedder was not defined.

func IsDefinedEmbedder added in v0.1.2

func IsDefinedEmbedder(g *genkit.Genkit, serverAddress string) bool

IsDefinedEmbedder reports whether the embedder with the given server address is defined by this plugin.

func IsDefinedModel added in v0.1.0

func IsDefinedModel(g *genkit.Genkit, name string) bool

IsDefinedModel reports whether a model is defined.

func Model

func Model(g *genkit.Genkit, name string) ai.Model

Model returns the ai.Model with the given name. It returns nil if the model was not configured.

Types

type EmbedOptions added in v0.1.2

type EmbedOptions struct {
	Model string `json:"model"`
}

type ModelDefinition

type ModelDefinition struct {
	Name string
	Type string
}

ModelDefinition represents a model with its name and api.

type Ollama added in v0.3.0

type Ollama struct {
	ServerAddress string // Server address of oLLama.
	Timeout       int    // Response timeout in seconds (defaulted to 30 seconds)
	// contains filtered or unexported fields
}

Ollama provides configuration options for the Init function.

func (*Ollama) DefineEmbedder added in v0.3.0

func (o *Ollama) DefineEmbedder(g *genkit.Genkit, serverAddress string, model string, embedOpts *ai.EmbedderOptions) ai.Embedder

DefineEmbedder defines an embedder with a given server address.

func (*Ollama) DefineModel added in v0.3.0

func (o *Ollama) DefineModel(g *genkit.Genkit, model ModelDefinition, opts *ai.ModelOptions) ai.Model

func (*Ollama) Init added in v0.3.0

func (o *Ollama) Init(ctx context.Context) []api.Action

Init initializes the plugin. Since Ollama models are locally hosted, the plugin doesn't initialize any default models. After downloading a model, call [DefineModel] to use it.

func (*Ollama) Name added in v0.5.0

func (o *Ollama) Name() string

Jump to

Keyboard shortcuts

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