File tree Expand file tree Collapse file tree 5 files changed +7
-0
lines changed Expand file tree Collapse file tree 5 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ type ToolMessage = {
143143 content: string
144144 role: " tool"
145145 toolCallId: string
146+ error? : string
146147}
147148` ` `
148149
@@ -152,6 +153,7 @@ type ToolMessage = {
152153| ` content ` | ` string ` | Text content of the message |
153154| ` role ` | ` " tool" ` | Role of the message sender, fixed as "tool" |
154155| ` toolCallId ` | ` string ` | ID of the tool call this message responds to |
156+ | ` error ` | ` string ` | Error message if the tool call failed |
155157
156158### Message
157159
Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ class ToolMessage(ConfiguredBaseModel):
144144 role: Literal[" tool" ]
145145 content: str
146146 tool_call_id: str
147+ error: Optional[str ] = None
147148```
148149
149150| Property | Type | Description |
@@ -152,6 +153,7 @@ class ToolMessage(ConfiguredBaseModel):
152153| ` content ` | ` str ` | Text content of the message |
153154| ` role ` | ` Literal["tool"] ` | Role of the message sender, fixed as "tool" |
154155| ` tool_call_id ` | ` str ` | ID of the tool call this message responds to |
156+ | ` error ` | ` Optional[str] ` | Error message if the tool call failed |
155157
156158### Message
157159
Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ class ToolMessage(ConfiguredBaseModel):
8686 role : Literal ["tool" ] = "tool"
8787 content : str
8888 tool_call_id : str
89+ error : Optional [str ] = None
8990
9091
9192Message = Annotated [
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ export const ToolMessageSchema = z.object({
4444 content : z . string ( ) ,
4545 role : z . literal ( "tool" ) ,
4646 toolCallId : z . string ( ) ,
47+ error : z . string ( ) . optional ( ) ,
4748} ) ;
4849
4950export const MessageSchema = z . discriminatedUnion ( "role" , [
Original file line number Diff line number Diff line change @@ -19,4 +19,5 @@ message Message {
1919 optional string name = 4 ;
2020 repeated ToolCall tool_calls = 5 ;
2121 optional string tool_call_id = 6 ;
22+ optional string error = 7 ;
2223}
You can’t perform that action at this time.
0 commit comments