File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -270,8 +270,9 @@ func (s *LiveSession) handleMsg(genContentResp *genai.GenerateContentResponse) i
270
270
271
271
resp2 , err := s .session .SendMessage (s .ctx , funcResults ... )
272
272
if err != nil {
273
- yield ("" , errors .WithStack (err ))
274
- return nil , errors .WithStack (err )
273
+ err = errors .WithStack (err )
274
+ yield ("" , err )
275
+ return nil , err
275
276
}
276
277
return resp2 , nil
277
278
}
@@ -284,7 +285,9 @@ func (s *LiveSession) handleMsg(genContentResp *genai.GenerateContentResponse) i
284
285
for {
285
286
s .logger .DebugF ("finish reasion: %s" , resp .Candidates [0 ].FinishReason )
286
287
if resp .Candidates [0 ].FinishReason == genai .FinishReasonMalformedFunctionCall {
287
- s .logger .Warnf ("malformed function call: %s" , resp .Candidates [0 ].FinishMessage )
288
+ err := errors .Errorf ("malformed function call: %s" , resp .Candidates [0 ].FinishMessage )
289
+ s .logger .Warnf ("%+v" , err )
290
+ yield ("" , err )
288
291
return
289
292
}
290
293
You can’t perform that action at this time.
0 commit comments