diff options
| author | Jeff Carr <[email protected]> | 2025-09-01 00:29:48 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-01 00:29:48 -0500 |
| commit | 4a800a7cfd6e8d59b021ff1b5a0ea9d42b89b7b3 (patch) | |
| tree | f6343d4cf86e121e5874f85502a4822613e54093 /main.go | |
| parent | eba85c6b97dbbab8b9b437e557a3dd5e6de41984 (diff) | |
attempts to submit data to the Gemini API
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 33 |
1 files changed, 3 insertions, 30 deletions
@@ -8,9 +8,6 @@ package main import ( "embed" "os" - "path/filepath" - "strconv" - "strings" "github.com/google/uuid" "go.wit.com/dev/alexflint/arg" @@ -61,43 +58,19 @@ func main() { me.chats.ConfigSave() } - aiClient, err := doConnect() + err := doConnect() if err != nil { badExit(err) } - _ = aiClient if argv.JsonFile != "" { - // now try to Marshal() into a protobuf - pb, err := parsePB(argv.JsonFile) - if err != nil { - badExit(err) - } - log.Info("GeminiContent pb.Marshal() worked pb.Contents len =", len(pb.Contents)) - _, filename := filepath.Split(argv.JsonFile) - parts := strings.Split(filename, ".") - - if len(parts) == 5 { - uuid := parts[1] - num, _ := strconv.Atoi(parts[3]) - log.Info(uuid, parts) - if chat := me.chats.FindByUuid(uuid); chat != nil { - log.Info("FOUND CHAT", uuid, num) - newEntry := new(chatpb.ChatEntry) - newEntry.GeminiRequest = pb - newEntry.ContentFile = filename - newEntry.RequestCounter = int32(num) - chat.AppendEntry(newEntry) - me.chats.ConfigSave() - } - } else { - } + doJSON() okExit("") } if argv.Interact != nil { log.Info("testing AI client with simpleHello()") - err = simpleHello(aiClient) + err = simpleHello() if err != nil { badExit(err) } |
