utils

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApiKeyKey           = "api_key"
	FrequencyPenaltyKey = "frequency_penalty"
	MaxTokensKey        = "max_tokens"
	ModelKey            = "model"
	PresencePenaltyKey  = "presence_penalty"
	QueryKey            = "query"
	TemperatureKey      = "temperature"
	TopKKey             = "top_k"
	TopPKey             = "top_p"
)

Variables

View Source
var AvailableModels = []string{"sonar-small-chat", "sonar-small-online", "sonar-medium-chat", "sonar-medium-online", "llama-2-70b-chat", "codellama-34b-instruct", "codellama-70b-instruct", "mistral-7b-instruct", "mixtral-8x7b-instruct"}

Functions

func InitConfig added in v0.5.0

func InitConfig()

func Prompt

func Prompt(label string) (string, error)

func PromptSelect

func PromptSelect(label string, items []string) (int, string, error)

func ResetConfig

func ResetConfig()

func UpdateConfigValue added in v0.5.0

func UpdateConfigValue(key string, value string)

func ValidateRequired

func ValidateRequired(value string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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