service

package
v0.0.0-...-0fe6855 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AiModel

type AiModel interface {
	Inference(ctx context.Context, input string) (string, error)
}

func NewAiModel

func NewAiModel(modelType AiModelType, cfg config.Config) AiModel

func NewAnthropicModel

func NewAnthropicModel(apiKey, apiPath string) AiModel

func NewOpenAiModel

func NewOpenAiModel(apiKey, organization, model string) AiModel

type AiModelType

type AiModelType string
const (
	AnthropicModelType AiModelType = "anthropic"
	OpenAiModelType    AiModelType = "openai"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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