ollamaprovider

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OLamaTextToJSONDefaultModel     = "llama3.1:latest"
	OLamaTextToJSONDefaultModelFast = "llama3.2:latest"
)
View Source
const (
	OLamaTextToTextDefaultModel     = "llama3.1:latest"
	OLamaTextToTextDefaultModelFast = "llama3.2:latest"
)

Variables

This section is empty.

Functions

func NewOlamaProviderConfig

func NewOlamaProviderConfig(baseURL, model string) olamaProviderConfig

func NewTextToJSONProvider added in v0.2.0

func NewTextToJSONProvider(
	config olamaProviderConfig,
	cmd *exec.Cmd,
) (baseprovider.TextToJSONProvider, error)

func NewTextToTextProvider

func NewTextToTextProvider(
	config olamaProviderConfig,
	cmd *exec.Cmd,
) (baseprovider.TextToTextProvider, error)

Types

type TextToJSONProvider added in v0.2.0

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

func (TextToJSONProvider) Close added in v0.2.0

func (p TextToJSONProvider) Close() error

func (TextToJSONProvider) GenerateCompletion added in v0.2.0

func (p TextToJSONProvider) GenerateCompletion(
	ctx context.Context,
	messages []chat.Message,
	completionCh chan<- completion.Completion,
) error

func (TextToJSONProvider) GetModel added in v0.2.0

func (p TextToJSONProvider) GetModel() string

type TextToTextProvider

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

func (TextToTextProvider) Close

func (p TextToTextProvider) Close() error

func (TextToTextProvider) GenerateCompletion

func (p TextToTextProvider) GenerateCompletion(
	ctx context.Context,
	messages []chat.Message,
	completionCh chan<- completion.Completion,
) error

func (TextToTextProvider) GetModel

func (p TextToTextProvider) GetModel() string

Jump to

Keyboard shortcuts

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