feat : fix displaying problem + memory compression on loading + personality prompt + technical image

This commit is contained in:
martin legrand
2025-03-28 14:43:05 +01:00
parent 8cba1bad43
commit c862d496e3
32 changed files with 448 additions and 66 deletions
+4 -3
View File
@@ -90,13 +90,13 @@ class Interaction:
self.last_query = query
return query
def think(self) -> None:
def think(self) -> bool:
"""Request AI agents to process the user input."""
if self.last_query is None or len(self.last_query) == 0:
return
return False
agent = self.router.select_agent(self.last_query)
if agent is None:
return
return False
if self.current_agent != agent and self.last_answer is not None:
## get last history from previous agent
self.current_agent.memory.push('user', self.last_query)
@@ -106,6 +106,7 @@ class Interaction:
self.last_answer, _ = agent.process(self.last_query, self.speech)
if self.last_answer == tmp:
self.last_answer = None
return True
def show_answer(self) -> None:
"""Show the answer to the user."""