Refactor the Action/Function components, and refactor the basic architecture of Agent Task/Todo.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# pylint:disable=E0402
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
@@ -51,7 +52,7 @@ class TodoListEnvironment(SimpleEnvironment):
|
||||
parent_id = params.get("parent")
|
||||
return await self.create_todo(parent_id,todoObj)
|
||||
|
||||
self.add_ai_operation(SimpleAIOperation(
|
||||
self.add_ai_operation(SimpleAIAction(
|
||||
op="create_todo",
|
||||
description="create todo",
|
||||
func_handler=create_todo,
|
||||
@@ -63,7 +64,7 @@ class TodoListEnvironment(SimpleEnvironment):
|
||||
new_stat = params["state"]
|
||||
return await self.update_todo(todo_id,new_stat)
|
||||
|
||||
self.add_ai_operation(SimpleAIOperation(
|
||||
self.add_ai_operation(SimpleAIAction(
|
||||
op="update_todo",
|
||||
description="update todo",
|
||||
func_handler=update_todo,
|
||||
|
||||
Reference in New Issue
Block a user