ollama

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOllama

func NewOllama(ctx context.Context, model string, temperature float64) (nuwaLLM.Model, error)

Types

type Ollama

type Ollama struct {
	Client       *ollama.LLM
	Temperature  float64
	SystemPrompt string
}

func (*Ollama) Chat

func (o *Ollama) Chat(ctx context.Context, message string) (string, error)

func (*Ollama) CloseBackend

func (o *Ollama) CloseBackend() error

func (*Ollama) GenerateContent

func (o *Ollama) GenerateContent(ctx context.Context, prompt string) (string, error)

func (*Ollama) SetSystemPrompt

func (o *Ollama) SetSystemPrompt(ctx context.Context, prompt string) error

Jump to

Keyboard shortcuts

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