mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-24 01:14:22 +01:00
moving run agent to tests & agnostic run working
This commit is contained in:
10
agent/hook.py
Normal file
10
agent/hook.py
Normal file
@@ -0,0 +1,10 @@
|
||||
async def run_specific_agent(task, conn):
|
||||
while (
|
||||
not conn.poll()
|
||||
): # Check if there's a termination signal from the main process
|
||||
response, cycle_count = await run_agent(
|
||||
task
|
||||
) # run the agent and get the response and cycle count
|
||||
|
||||
# Send response and cycle count back to the main process
|
||||
conn.send((response, cycle_count))
|
||||
Reference in New Issue
Block a user