ollama

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: Apache-2.0 Imports: 15 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 DefineModel added in v0.0.2

func DefineModel(model ModelDefinition, caps *ai.ModelCapabilities) *ai.Model

func Init

func Init(ctx context.Context, serverAddress string) (err error)

Note: Since Ollama models are locally hosted, the plugin doesn't initialize any default models. The user has to explicitly decide which model to pull down.

func Model

func Model(name string) *ai.Model

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

Types

type Config

type Config struct {
	// Server Address of oLLama.
	ServerAddress string
	// Generative models to provide.
	Models []ModelDefinition
}

Config provides configuration options for the Init function.

type ModelDefinition

type ModelDefinition struct {
	Name string
	Type string
}

ModelDefinition represents a model with its name and type.

Jump to

Keyboard shortcuts

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