fix : execution problem when line start with block tag + dont load tts if disabled
This commit is contained in:
@@ -171,6 +171,8 @@ class Agent():
|
||||
feedback = ""
|
||||
success = False
|
||||
blocks = None
|
||||
if answer.startswith("```"):
|
||||
answer = "I will execute:\n" + answer # there should always be a text before blocks for the function that display answer
|
||||
|
||||
for name, tool in self.tools.items():
|
||||
feedback = ""
|
||||
|
||||
@@ -87,6 +87,7 @@ class PlannerAgent(Agent):
|
||||
animate_thinking("Thinking...", color="status")
|
||||
self.memory.push('user', prompt)
|
||||
answer, _ = self.llm_request()
|
||||
pretty_print(answer.split('\n')[0], color="output")
|
||||
self.show_plan(answer)
|
||||
ok_str = input("Is the plan ok? (y/n): ")
|
||||
if ok_str == 'y':
|
||||
|
||||
Reference in New Issue
Block a user