aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterminaldweller <devi@terminaldweller.com>2024-05-10 14:02:12 +0000
committerterminaldweller <devi@terminaldweller.com>2024-05-10 14:02:12 +0000
commit7dd6ecf5ebb1ba4267029cede170bcd6aa00c407 (patch)
treeaf8cde63eee7066a21c7c3e19d4ee56840be033b
parentWIP (diff)
downloadmilla-7dd6ecf5ebb1ba4267029cede170bcd6aa00c407.tar.gz
milla-7dd6ecf5ebb1ba4267029cede170bcd6aa00c407.zip
changd the tag to message from messages for the response
-rw-r--r--main.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/main.go b/main.go
index 540e15d..62bc8d5 100644
--- a/main.go
+++ b/main.go
@@ -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()))