Versions in this module Expand all Collapse all v1 v1.0.0 Sep 5, 2023 Changes in this version + func AppendMessage(role string, content string) + func CreateTable() + func DecryptMessage(key []byte, encodedMessage string) (string, error) + func EncryptMessage(key []byte, message string) (string, error) + func GetAppPath() string + func GetEncryptionKey() []byte + func InitOrDie() + func InsertKey(key string, value string) + func IsSettingsTableCreated() bool + func OpenAiRequest(query string) string + func OpenDatabase() error + func PopulateSettings() + func PrintAiAnswer(input string) + func PromptCustomOrDefault(question string, defaultValue string) string + func PromptInit() + func ReadQuestion() + func RunQuery(input string) + func StartAiThinking() + func StopAiThinking() + func StrToFloat(s string) float32 + func StrToInt(s string) int + type ApiPostBody struct + FrequencyPenalty float32 + MaxTokens int + Messages []Message + Model string + PresencePenalty float32 + Temperature float32 + type Choice struct + FinishReason string + Message Message + Role string + type Message struct + Content string + Role string + func GetMessages() []Message + type OpenApiResponse struct + Choices []Choice + Id string + Model string + type Settings struct + ApiKey string + ApiURL string + FrequencyPenalty float32 + MaxTokens int + Model string + PresencePenalty float32 + SystemMessage string + Temperature float32 + func FetchSettings() *Settings + func GetDefaultSettings() *Settings