diff options
author | terminaldweller <devi@terminaldweller.com> | 2024-05-10 16:34:47 +0000 |
---|---|---|
committer | terminaldweller <devi@terminaldweller.com> | 2024-05-10 16:34:47 +0000 |
commit | 8f3f154b4495dd63ddd1590fe01eb5e0fbbdc205 (patch) | |
tree | 2933bcd4b3d85348816cb235e5aa476f1f1cf0c9 | |
parent | fixes #3 (diff) | |
download | milla-8f3f154b4495dd63ddd1590fe01eb5e0fbbdc205.tar.gz milla-8f3f154b4495dd63ddd1590fe01eb5e0fbbdc205.zip |
WIP
Diffstat (limited to '')
-rw-r--r-- | main.go | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -98,6 +98,7 @@ func printResponse(resp *genai.GenerateContentResponse) string { func runIRC(appConfig TomlConfig, ircChan chan *girc.Client) { var Memory []MemoryElement + irc := girc.New(girc.Config{ Server: appConfig.IrcServer, Port: appConfig.IrcPort, @@ -264,13 +265,23 @@ func runIRC(appConfig TomlConfig, ircChan chan *girc.Client) { model.SetTemperature(float32(appConfig.Temp)) model.SetTopK(appConfig.TopK) model.SetTopP(appConfig.TopP) - resp, err := model.GenerateContent(ctx, genai.Text(prompt)) + + cs := model.StartChat() + + resp, err := cs.SendMessage(ctx, genai.Text(prompt)) if err != nil { client.Cmd.ReplyTo(event, fmt.Sprintf("error: %s", err.Error())) return } + // resp, err := model.GenerateContent(ctx, genai.Text(prompt)) + // if err != nil { + // client.Cmd.ReplyTo(event, fmt.Sprintf("error: %s", err.Error())) + + // return + // } + var writer bytes.Buffer err = quick.Highlight( &writer, |