fix : execution problem when line start with block tag + dont load tts if disabled

This commit is contained in:
martin legrand
2025-03-28 18:51:03 +01:00
parent 0c7ce90980
commit 0bf813e865
9 changed files with 40 additions and 47 deletions
+2
View File
@@ -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 = ""
+1
View File
@@ -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':