File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -58,19 +58,15 @@ var toolHandlerMiddleware = func(next server.ToolHandlerFunc) server.ToolHandler
5858 }
5959
6060 tagWithSessionID (ctx , toolSpan )
61-
6261 toolSpan .AnnotateTextIO (string (inputJSON ), outputText )
6362
64- // There are two ways a tool can express an error.
65-
66- // It can return a Go error .
63+ // There are two ways a tool can express an error:
64+ // 1. It can return a Go error.
65+ // 2. It can return IsError: true as part of the tool result .
6766 if err != nil {
6867 toolSpan .Finish (llmobs .WithError (err ))
69-
70- // It can return IsError: true as part of the tool result.
7168 } else if result != nil && result .IsError {
7269 toolSpan .Finish (llmobs .WithError (errors .New ("tool resulted in an error" )))
73-
7470 } else {
7571 toolSpan .Finish ()
7672 }
You can’t perform that action at this time.
0 commit comments