mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-01-04 23:04:28 +01:00
Updated step handler to mark step as complete
This commit is contained in:
@@ -4,6 +4,8 @@ import autogpt.utils
|
||||
|
||||
|
||||
class AutoGPT:
|
||||
|
||||
|
||||
def __init__(self) -> None:
|
||||
pass
|
||||
|
||||
@@ -14,8 +16,7 @@ class AutoGPT:
|
||||
|
||||
async def step_handler(self, step: Step) -> Step:
|
||||
print(f"step: {step.input}")
|
||||
await Agent.db.create_step(
|
||||
step.task_id, f"Nothing to see here.. {step.name}", is_last=True
|
||||
)
|
||||
step.output = step.input
|
||||
return step
|
||||
step = Agent.db.get_step(step.step_id)
|
||||
updated_step: Step = Agent.db.update_step(step.step_id, status="completed")
|
||||
updated_step.output = step.input
|
||||
return updated_step
|
||||
|
||||
Reference in New Issue
Block a user