minor
This commit is contained in:
parent
fbbed0475b
commit
96843095f5
25
main.go
25
main.go
|
@ -8,8 +8,6 @@ package main
|
||||||
import (
|
import (
|
||||||
"embed"
|
"embed"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"go.wit.com/dev/alexflint/arg"
|
"go.wit.com/dev/alexflint/arg"
|
||||||
|
@ -67,29 +65,15 @@ func main() {
|
||||||
_ = aiClient
|
_ = aiClient
|
||||||
|
|
||||||
if argv.JsonFile != "" {
|
if argv.JsonFile != "" {
|
||||||
/*
|
|
||||||
jstruct, err := parseJSON(argv.JsonFile)
|
|
||||||
if err != nil {
|
|
||||||
badExit(err)
|
|
||||||
}
|
|
||||||
log.Info("parseJSON() ok. model =", jstruct.Model)
|
|
||||||
|
|
||||||
// Marshal this JSON file into a protobuf
|
|
||||||
genaiContent, err := convertToGenai(jstruct)
|
|
||||||
if err != nil {
|
|
||||||
badExit(err)
|
|
||||||
}
|
|
||||||
log.Info("Successfully converted JSON to genai.Content")
|
|
||||||
// Here you would now use the 'genaiContent' to send to the API
|
|
||||||
_ = genaiContent // Prevent unused variable error for now
|
|
||||||
*/
|
|
||||||
|
|
||||||
// now try to Marshal() into a protobuf
|
// now try to Marshal() into a protobuf
|
||||||
pb, err := parsePB(argv.JsonFile)
|
pb, err := parsePB(argv.JsonFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
badExit(err)
|
badExit(err)
|
||||||
}
|
}
|
||||||
log.Info("GeminiContent pb.Marshal() worked len =", len(pb.Contents))
|
log.Info("GeminiContent pb.Marshal() worked len =", len(pb.Contents))
|
||||||
|
okExit("")
|
||||||
|
}
|
||||||
|
/*
|
||||||
_, filename := filepath.Split(argv.JsonFile)
|
_, filename := filepath.Split(argv.JsonFile)
|
||||||
parts := strings.Split(filename, ".")
|
parts := strings.Split(filename, ".")
|
||||||
|
|
||||||
|
@ -103,8 +87,7 @@ func main() {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
okExit("")
|
*/
|
||||||
}
|
|
||||||
|
|
||||||
if argv.Interact != nil {
|
if argv.Interact != nil {
|
||||||
log.Info("testing AI client with simpleHello()")
|
log.Info("testing AI client with simpleHello()")
|
||||||
|
|
Loading…
Reference in New Issue