ollama

package module
v0.0.0-...-40b5528 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

Package ollama provides an encoder using Ollama models.

Ollama is the easiest way to get started with LLMs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

type Encoder struct {
	Client *api.Client
	Model  string
}

Encoder is an encoder using Ollama models.

func NewEncoder

func NewEncoder(client *api.Client, model string) *Encoder

NewEncoder creates a new Encoder.

func (*Encoder) Encode

func (e *Encoder) Encode(
	ctx context.Context,
	query string,
) (result []float64, err error)

Encode encodes a query string into a Ollama embedding.

Jump to

Keyboard shortcuts

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