fix : avoid loading compress of planner agent memory

This commit is contained in:
martin legrand 2025-04-04 11:57:06 +02:00
parent ff9c1576b6
commit 95f43be2af
3 changed files with 6 additions and 4 deletions

View File

@ -23,9 +23,9 @@ class PlannerAgent(Agent):
"web": BrowserAgent(name, "prompts/base/browser_agent.txt", provider, verbose=False, browser=browser)
}
self.role = {
"en": "Research, setup and code",
"fr": "Recherche, configuration et codage",
"zh": "研究,设置和编码",
"en": "Complex Task",
"fr": "Tache complexe",
"zh": "复杂任务",
}
self.type = "planner_agent"

View File

@ -58,6 +58,8 @@ class Interaction:
def load_last_session(self):
"""Recover the last session."""
for agent in self.agents:
if agent.type == "planner_agent":
continue
agent.memory.load_memory(agent.type)
def save_session(self):

View File

@ -97,7 +97,7 @@ class Transcript:
return "cuda:0"
else:
return "cpu"
def remove_hallucinations(self, text: str) -> str:
"""Remove model hallucinations from the text."""
# TODO find a better way to do this