We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d4e9537 commit cc26c3fCopy full SHA for cc26c3f
1 file changed
pkg/evaluation/eval.go
@@ -577,8 +577,10 @@ func buildTranscript(events []map[string]any) string {
577
case "tool_call_response":
578
// The ToolCallResponseEvent has tool_definition at the top level, not
579
// nested under "tool_call".
580
- td, _ := event["tool_definition"].(map[string]any)
581
- name, _ := td["name"].(string)
+ var name string
+ if td, ok := event["tool_definition"].(map[string]any); ok {
582
+ name, _ = td["name"].(string)
583
+ }
584
response, _ := event["response"].(string)
585
if len(response) > 500 {
586
response = response[:500] + "...(truncated)"
0 commit comments