Merge data from a streaming chunk into this tool call. Args: chunk: New chunk data to merge
(self, chunk: "ToolCallData")
| 106 | ) |
| 107 | |
| 108 | def merge_chunk(self, chunk: "ToolCallData") -> None: |
| 109 | """Merge data from a streaming chunk into this tool call. |
| 110 | |
| 111 | Args: |
| 112 | chunk: New chunk data to merge |
| 113 | """ |
| 114 | # Update function name if provided |
| 115 | if chunk.function.name: |
| 116 | self.function.name = chunk.function.name |
| 117 | |
| 118 | # Accumulate arguments (concatenate JSON strings) |
| 119 | if chunk.function.arguments: |
| 120 | self.function.arguments += chunk.function.arguments |
| 121 | |
| 122 | |
| 123 | class HistoryMessage(BaseModel): |
no outgoing calls