Fix: Agent.reset() argument wrong #10463 & Unable to converse with agent through Python API. #10415 (#10472)

### What problem does this PR solve?
Fix: Agent.reset() argument wrong #10463 & Unable to converse with agent
through Python API. #10415

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Billy Bao
2025-10-10 20:44:05 +08:00
committed by GitHub
parent 390b2b8f26
commit 534fa60b2a
5 changed files with 37 additions and 23 deletions

View File

@ -203,7 +203,6 @@ class Canvas(Graph):
self.history = []
self.retrieval = []
self.memory = []
for k in self.globals.keys():
if isinstance(self.globals[k], str):
self.globals[k] = ""
@ -292,7 +291,6 @@ class Canvas(Graph):
"thoughts": self.get_component_thoughts(self.path[i])
})
_run_batch(idx, to)
# post processing of components invocation
for i in range(idx, to):
cpn = self.get_component(self.path[i])
@ -393,7 +391,6 @@ class Canvas(Graph):
self.path = path
yield decorate("user_inputs", {"inputs": another_inputs, "tips": tips})
return
self.path = self.path[:idx]
if not self.error:
yield decorate("workflow_finished",

View File

@ -346,7 +346,7 @@ Respond immediately with your final comprehensive answer.
return "Error occurred."
def reset(self):
def reset(self, temp=False):
for k, cpn in self.tools.items():
cpn.reset()