diff options
Diffstat (limited to 'json.go')
| -rw-r--r-- | json.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -4,6 +4,7 @@ import ( "encoding/json" "os" + "go.wit.com/lib/protobuf/chatpb" "go.wit.com/log" "google.golang.org/genai" ) @@ -53,6 +54,10 @@ func parseJSON(filename string) (*GeminiRequest, error) { if err != nil { return nil, log.Errorf("failed to read file %s: %w", filename, err) } + pb := new(chatpb.GeminiRequest) + if err := pb.UnmarshalJSON(data); err != nil { + return nil, err + } // Unmarshal the JSON data var req *GeminiRequest |
