mirror of https://github.com/langgenius/dify.git
fix: allow repeated tool calls with same tool_call_id
This commit is contained in:
parent
4707a319e5
commit
8f75be52a1
|
|
@ -186,6 +186,9 @@ class StreamEventBuffer:
|
|||
idx = self._tool_call_id_map[tool_call_id]
|
||||
self.tool_calls[idx]["result"] = result
|
||||
self.tool_calls[idx]["elapsed_time"] = tool_elapsed_time
|
||||
# Remove from map after result is recorded, so that subsequent calls
|
||||
# with the same tool_call_id are treated as new tool calls
|
||||
del self._tool_call_id_map[tool_call_id]
|
||||
|
||||
def finalize(self) -> None:
|
||||
"""Finalize the buffer, flushing any pending data."""
|
||||
|
|
|
|||
Loading…
Reference in New Issue