fix get latest step (#1412)

This commit is contained in:
LawyZheng
2024-12-18 13:35:42 +08:00
committed by GitHub
parent 58413db172
commit a6fec7b282

View File

@@ -380,6 +380,7 @@ class AgentDB:
.filter_by(task_id=task_id)
.filter_by(organization_id=organization_id)
.order_by(StepModel.order.desc())
.order_by(StepModel.retry_index.desc())
)
).first():
return convert_to_step(step, debug_enabled=self.debug_enabled)