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 = {
143
143
content: string
144
144
role: " tool"
145
145
toolCallId: string
146
+ error? : string
146
147
}
147
148
` ` `
148
149
@@ -152,6 +153,7 @@ type ToolMessage = {
152
153
| ` content ` | ` string ` | Text content of the message |
153
154
| ` role ` | ` " tool" ` | Role of the message sender, fixed as "tool" |
154
155
| ` toolCallId ` | ` string ` | ID of the tool call this message responds to |
156
+ | ` error ` | ` string ` | Error message if the tool call failed |
155
157
156
158
### Message
157
159
Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ class ToolMessage(ConfiguredBaseModel):
144
144
role: Literal[" tool" ]
145
145
content: str
146
146
tool_call_id: str
147
+ error: Optional[str ] = None
147
148
```
148
149
149
150
| Property | Type | Description |
@@ -152,6 +153,7 @@ class ToolMessage(ConfiguredBaseModel):
152
153
| ` content ` | ` str ` | Text content of the message |
153
154
| ` role ` | ` Literal["tool"] ` | Role of the message sender, fixed as "tool" |
154
155
| ` tool_call_id ` | ` str ` | ID of the tool call this message responds to |
156
+ | ` error ` | ` Optional[str] ` | Error message if the tool call failed |
155
157
156
158
### Message
157
159
Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ class ToolMessage(ConfiguredBaseModel):
86
86
role : Literal ["tool" ] = "tool"
87
87
content : str
88
88
tool_call_id : str
89
+ error : Optional [str ] = None
89
90
90
91
91
92
Message = Annotated [
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ export const ToolMessageSchema = z.object({
44
44
content : z . string ( ) ,
45
45
role : z . literal ( "tool" ) ,
46
46
toolCallId : z . string ( ) ,
47
+ error : z . string ( ) . optional ( ) ,
47
48
} ) ;
48
49
49
50
export const MessageSchema = z . discriminatedUnion ( "role" , [
Original file line number Diff line number Diff line change @@ -19,4 +19,5 @@ message Message {
19
19
optional string name = 4 ;
20
20
repeated ToolCall tool_calls = 5 ;
21
21
optional string tool_call_id = 6 ;
22
+ optional string error = 7 ;
22
23
}
You can’t perform that action at this time.
0 commit comments