mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-05 15:31:08 +00:00
Memory recall speedup
This commit is contained in:
parent
8ec3b24696
commit
4e028a3ce4
7 changed files with 198 additions and 164 deletions
19
python/extensions/message_loop_prompts/_91_recall_wait.py
Normal file
19
python/extensions/message_loop_prompts/_91_recall_wait.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
from python.helpers.extension import Extension
|
||||
from agent import LoopData
|
||||
from python.extensions.message_loop_prompts._50_recall_memories import DATA_NAME_TASK as DATA_NAME_TASK_MEMORIES
|
||||
from python.extensions.message_loop_prompts._51_recall_solutions import DATA_NAME_TASK as DATA_NAME_TASK_SOLUTIONS
|
||||
|
||||
|
||||
class RecallWait(Extension):
|
||||
async def execute(self, loop_data: LoopData = LoopData(), **kwargs):
|
||||
|
||||
task = self.agent.get_data(DATA_NAME_TASK_MEMORIES)
|
||||
if task and not task.done():
|
||||
self.agent.context.log.set_progress("Recalling memories...")
|
||||
await task
|
||||
|
||||
task = self.agent.get_data(DATA_NAME_TASK_SOLUTIONS)
|
||||
if task and not task.done():
|
||||
self.agent.context.log.set_progress("Recalling solutions...")
|
||||
await task
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue