diff options
author | terminaldweller <devi@terminaldweller.com> | 2024-10-28 22:28:16 +0000 |
---|---|---|
committer | terminaldweller <devi@terminaldweller.com> | 2024-10-28 22:28:16 +0000 |
commit | e22d58cee6d9bb963f879fde8890e7743269afb3 (patch) | |
tree | 7521268ce29b4fca3b97bfe7451a828b7b880ca5 /types.go | |
parent | added a new option, context. fixed a bug with the custom commands where the c... (diff) | |
download | milla-e22d58cee6d9bb963f879fde8890e7743269afb3.tar.gz milla-e22d58cee6d9bb963f879fde8890e7743269afb3.zip |
added openrouter as a provider
Diffstat (limited to 'types.go')
-rw-r--r-- | types.go | 31 |
1 files changed, 30 insertions, 1 deletions
@@ -56,7 +56,7 @@ type TomlConfig struct { IrcNick string `toml:"ircNick"` IrcSaslUser string `toml:"ircSaslUser"` IrcSaslPass string `toml:"ircSaslPass"` - OllamaEndpoint string `toml:"ollamaEndpoint"` + Endpoint string `toml:"endpoint"` Model string `toml:"model"` ChromaStyle string `toml:"chromaStyle"` ChromaFormatter string `toml:"chromaFormatter"` @@ -79,6 +79,7 @@ type TomlConfig struct { WebIRCHostname string `toml:"webIRCHostname"` WebIRCAddress string `toml:"webIRCAddress"` RSSFile string `toml:"rssFile"` + AnthropicVersion string `toml:"anthropicVersion"` Plugins []string `toml:"plugins"` Context []string `toml:"context"` CustomCommands map[string]CustomCommand `toml:"customCommands"` @@ -176,6 +177,34 @@ type OllamaChatRequest struct { Messages []MemoryElement `json:"messages"` } +type ORMessage struct { + Role string `json:"role"` + Content string `json:"content"` + Refusal string `json:"refusal"` +} + +type ORChoice struct { + FinishReason string `json:"finish_reason"` + Index int `json:"index"` + Message ORMessage `json:"message"` +} + +type ORUsage struct { + PromptTokens int `json:"prompt_tokens"` + CompletionTokens int `json:"completion_tokens"` + TotalTokens int `json:"total_tokens"` +} +type ORResponse struct { + Id string `json:"id"` + Provider string `json:"provider"` + Model string `json:"model"` + Object string `json:"object"` + Created int64 `json:"created"` + Choices []ORChoice `json:"choices"` + SystemFingerprint string `json:"system_fingerprint"` + Usage ORUsage `json:"usage"` +} + type MemoryElement struct { Role string `json:"role"` Content string `json:"content"` |