mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-04 10:59:27 +00:00
### What problem does this PR solve? Fix #10497 ### Type of change - [X] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
ad56137a59
commit
58836d84fe
@ -347,6 +347,10 @@ Respond immediately with your final comprehensive answer.
|
||||
return "Error occurred."
|
||||
|
||||
def reset(self, temp=False):
|
||||
"""
|
||||
Reset all tools if they have a reset method. This avoids errors for tools like MCPToolCallSession.
|
||||
"""
|
||||
for k, cpn in self.tools.items():
|
||||
cpn.reset()
|
||||
if hasattr(cpn, "reset") and callable(cpn.reset):
|
||||
cpn.reset()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user