config

package
v1.27.13 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2025 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultOpenAIModel            = "gpt-3.5-turbo"
	DefaultOpenAITemperature      = 0.0
	DefaultOpenAIMaxTokens        = defaultMaxTokens[DefaultOpenAIModel]
	DefaultOpenAIFrequencyPenalty = 0.0
	DefaultOpenAIPresencePenalty  = 0.0
	DefaultOpenAITopP             = 1.0
	DefaultOpenAIBaseURL          = "https://api.openai.com"
	DefaultApiVersion             = "2024-02-01"
)

Functions

func GetMaxTokensForModel added in v1.27.1

func GetMaxTokensForModel(model string) float64

func IsAzure added in v1.27.1

func IsAzure(isAzure bool, resourceName, deploymentID string) bool

func IsLegacy added in v1.27.1

func IsLegacy(model string) bool

func IsThirdPartyProvider added in v1.27.1

func IsThirdPartyProvider(baseURL string, isAzure bool, resourceName, deploymentID string) bool

Types

type ClassSettings added in v1.18.4

type ClassSettings interface {
	Model() string
	MaxTokens() float64
	Temperature() float64
	FrequencyPenalty() float64
	PresencePenalty() float64
	TopP() float64
	ResourceName() string
	DeploymentID() string
	IsAzure() bool
	Validate(class *models.Class) error
	BaseURL() string
	ApiVersion() string
}

func NewClassSettings

func NewClassSettings(cfg moduletools.ClassConfig) ClassSettings

Jump to

Keyboard shortcuts

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