diff --git a/agentmain.py b/agentmain.py index 4e06285d..ddf1f8a0 100644 --- a/agentmain.py +++ b/agentmain.py @@ -42,6 +42,10 @@ def get_system_prompt(): prompt += get_global_memory() return prompt +# SDK: +# agent = GenericAgent(); threading.Thread(target=agent.run, daemon=True).start() +# output1_queue = agent.put_task(prompt1) +# output2_queue = agent.put_task(prompt2) class GenericAgent: def __init__(self): os.makedirs(os.path.join(script_dir, 'temp'), exist_ok=True) @@ -187,7 +191,7 @@ class GenericAgent: self.task_queue.task_done() if self.handler is not None: self.handler.code_stop_signal.append(1) -GeneraticAgent = GenericAgent +GeneraticAgent = GenericAgent if __name__ == '__main__': import argparse diff --git a/ga.py b/ga.py index 3ae4f991..f21feace 100644 --- a/ga.py +++ b/ga.py @@ -503,7 +503,7 @@ class GenericAgentHandler(BaseHandler): if remaining == 0: self._exit_plan_mode(); yield "[Info] Plan完成:plan.md中0个[ ]残留,退出plan模式。\n" - yield "[Info] Final response to user.\n" + #yield "[Info] Final response to user.\n" return StepOutcome(response, next_prompt=None) def do_start_long_term_update(self, args, response): diff --git a/memory/ljqCtrl_sop.md b/memory/ljqCtrl_sop.md index 952517ef..80a23090 100644 --- a/memory/ljqCtrl_sop.md +++ b/memory/ljqCtrl_sop.md @@ -10,6 +10,7 @@ - `ljqCtrl.GrabWindow(hwnd_or_name)`: 前台截图(先Activate), 传hwnd(int)或窗口标题子串(str), 返回PIL Image - `ljqCtrl.GrabWindowBg(hwnd_or_name, timeout=5)`: WGC后台截图(Win10+) - `ljqCtrl.MouseDClick(staytime=0.05)`: 鼠标双击 +- 可先阅读computer_use.md ## 1. 环境载入 import ljqCtrl