Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DataDir = "" CfgFile = "" DbFile = "" LogLevel = "INFO" AnthropicApiKey = "" AnthropicUrl = "https://api.anthropic.com/" AnthropicEndpoint = "v1/messages" AnthropicVersion = "2023-06-01" AnthropicBeta = "" MaxTokens = 2000 Model = "claude-3-5-sonnet-20240620" Stream = true Temperature float64 // might should be a string in order to support an empty value? TopP float64 // might should be a string in order to support an empty value? TopK float64 // might should be a string in order to support an empty value? DataDirKey = "data_dir" CfgFileKey = "cfg_file" DbFileKey = "db_file" LogLevelKey = "log_level" AnthropicApiKeyKey = "anthropic_api_key" AnthropicUrlKey = "anthropic_url" AnthropicEndpointKey = "anthropic_endpoint" AnthropicVersionKey = "anthropic_version" AnthripicBetaKey = "anthropic_beta" MaxTokensKey = "max_tokens" ModelKey = "model_key" StreamKey = "enableHttpStream" TemperatureKey = "temperature_key" TopPKey = "top_p" TopKKey = "top_k" )
View Source
var ConfigItems = []ConfigItem{ {Flag: "stream", ConfigKey: StreamKey, Value: &Stream}, {Flag: "max-tokens", ConfigKey: MaxTokensKey, Value: &MaxTokens}, {Flag: "data-dir", ConfigKey: DataDirKey, Value: &DataDir}, {Flag: "cfg-file", ConfigKey: CfgFileKey, Value: &CfgFile}, {Flag: "db-file", ConfigKey: DbFileKey, Value: &DbFile}, {Flag: "log-level", ConfigKey: LogLevelKey, Value: &LogLevel}, {Flag: "anthropic-url", ConfigKey: AnthropicUrlKey, Value: &AnthropicUrl}, {Flag: "anthropic-endpoint", ConfigKey: AnthropicEndpointKey, Value: &AnthropicEndpoint}, {Flag: "anthropic-version", ConfigKey: AnthropicVersionKey, Value: &AnthropicVersion}, {Flag: "anthropic-beta", ConfigKey: AnthripicBetaKey, Value: &AnthropicBeta}, {Flag: "max-tokens", ConfigKey: MaxTokensKey, Value: &MaxTokens}, {Flag: "model", ConfigKey: ModelKey, Value: &Model}, {Flag: "stream", ConfigKey: StreamKey, Value: &Stream}, {Flag: "temperature", ConfigKey: TemperatureKey, Value: &Temperature}, {Flag: "top-p", ConfigKey: TopPKey, Value: &TopP}, {Flag: "top-k", ConfigKey: TopKKey, Value: &TopK}, }
Functions ¶
func GetFloat64 ¶
func InitConfig ¶
func InitConfig()
func ResetToDefaults ¶
func ResetToDefaults()
func UpdateConfig ¶
Types ¶
type ConfigItem ¶
Click to show internal directories.
Click to hide internal directories.