ollama

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertHuggingFaceModelNameToOllama added in v0.12.0

func ConvertHuggingFaceModelNameToOllama(hfModelName string) (string, error)

ConvertHuggingFaceModelNameToOllama converts a HuggingFace model name to an official Ollama model name.

Types

type Manager

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

Manager manages the Ollama service.

func NewManager

func NewManager(port int) *Manager

NewManager returns a new Manager.

func (*Manager) CreateNewModel

func (m *Manager) CreateNewModel(modelName string, spec *ModelSpec) error

CreateNewModel creates a new model with the given name and spec.

func (*Manager) PullBaseModel added in v0.7.0

func (m *Manager) PullBaseModel(modelName string) error

PullBaseModel pulls the base model from the given path.

func (*Manager) Run

func (m *Manager) Run() error

Run starts the Ollama service on the given port.

func (*Manager) WaitForReady added in v0.7.0

func (m *Manager) WaitForReady() error

WaitForReady waits for the Ollama service to be ready.

type ModelSpec

type ModelSpec struct {
	From        string
	AdapterPath string
}

ModelSpec is the specification for a new model.

Jump to

Keyboard shortcuts

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