config

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const APP_FOLDER = ".botman"
View Source
const LlmProviderClaude = "claude"
View Source
const LlmProviderFireworksAi = "fireworksai"
View Source
const LlmProviderOpenAi = "openai"

Variables

This section is empty.

Functions

func SaveForUser

func SaveForUser(config BotmanConfig) error

Types

type BotmanConfig added in v1.1.3

type BotmanConfig struct {
	Version      int             `yaml:"version"`
	OpenAiKey    string          `yaml:"openAiKey,omitempty"` //Deprecated, use OpenAi.ApiKey instead
	SaveHistory  bool            `yaml:"saveHistory"`
	SystemPrompt string          `yaml:"systemPrompt"`
	LlmProvider  string          `yaml:"llmProvider"`
	OpenAi       OpenAiConfig    `yaml:"openAi"`
	FireworksAi  FireworksConfig `yaml:"fireworksAi"`
	Claude       ClaudeConfig    `yaml:"claude"`
}

func Load

func Load(path string) (BotmanConfig, error)

func LoadFromEnv added in v1.1.4

func LoadFromEnv() BotmanConfig

func LoadFromUser

func LoadFromUser() BotmanConfig

func NewAppConfig

func NewAppConfig() BotmanConfig

type ClaudeConfig added in v1.1.2

type ClaudeConfig struct {
	ApiKey       string `yaml:"apiKey"`
	Model        string `yaml:"model"`
	SystemPrompt string `yaml:"systemPrompt"`
	MaxTokens    int    `yaml:"maxTokens"`
}

type FireworksConfig added in v1.1.1

type FireworksConfig struct {
	ApiKey       string `yaml:"apiKey"`
	Model        string `yaml:"model"`
	SystemPrompt string `yaml:"systemPrompt"`
}

type OpenAiConfig added in v1.1.0

type OpenAiConfig struct {
	ApiKey       string `yaml:"apiKey"`
	Model        string `yaml:"model"`
	SystemPrompt string `yaml:"systemPrompt"`
}

Jump to

Keyboard shortcuts

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