refactor : memory clear section function logic

This commit is contained in:
martin legrand
2025-04-09 19:03:04 +02:00
parent ed2a9cc204
commit 7553d9dbb6
5 changed files with 21 additions and 87 deletions
+1 -1
View File
@@ -357,7 +357,7 @@ class BrowserAgent(Agent):
mem_last_idx = self.memory.push('user', prompt)
answer, reasoning = self.llm_request()
pretty_print(answer, color="output")
self.memory.clear_section(mem_begin_idx, mem_last_idx)
self.memory.clear_section(mem_begin_idx+1, mem_last_idx-1)
return answer, reasoning
if __name__ == "__main__":