diff options
author | terminaldweller <devi@terminaldweller.com> | 2024-05-10 14:02:12 +0000 |
---|---|---|
committer | terminaldweller <devi@terminaldweller.com> | 2024-05-10 14:02:12 +0000 |
commit | 7dd6ecf5ebb1ba4267029cede170bcd6aa00c407 (patch) | |
tree | af8cde63eee7066a21c7c3e19d4ee56840be033b | |
parent | WIP (diff) | |
download | milla-7dd6ecf5ebb1ba4267029cede170bcd6aa00c407.tar.gz milla-7dd6ecf5ebb1ba4267029cede170bcd6aa00c407.zip |
changd the tag to message from messages for the response
-rw-r--r-- | main.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -66,6 +66,10 @@ type OllamaChatMessages struct { Messages []OllamaChatMessage `json:"messages"` } +type OllamaChatMessagesResponse struct { + Messages []OllamaChatMessage `json:"message"` +} + type OllamaRequest struct { Model string `json:"model"` System string `json:"system"` @@ -226,7 +230,7 @@ func runIRC(appConfig TomlConfig, ircChan chan *girc.Client) { var writer bytes.Buffer if appConfig.Chat { - var ollamaChatResponse OllamaChatMessages + var ollamaChatResponse OllamaChatMessagesResponse err = json.NewDecoder(response.Body).Decode(&ollamaChatResponse) if err != nil { client.Cmd.ReplyTo(event, fmt.Sprintf("error: %s", err.Error())) |