Skip to content

Commit dd69063

Browse files
committed
fix custom views
1 parent 7f6105f commit dd69063

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/agent/custom_views.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ class CustomAgentStepInfo:
2020
class CustomAgentBrain(BaseModel):
2121
"""Current state of the agent"""
2222

23-
prev_action_evaluation: str
23+
evaluation_previous_goal: str
2424
important_contents: str
2525
task_progress: str
2626
future_plans: str
2727
thought: str
28-
summary: str
28+
next_goal: str
2929

3030

3131
class CustomAgentOutput(AgentOutput):
@@ -34,22 +34,21 @@ class CustomAgentOutput(AgentOutput):
3434
@dev note: this model is extended with custom actions in AgentService. You can also use some fields that are not in this model as provided by the linter, as long as they are registered in the DynamicActions model.
3535
"""
3636

37-
model_config = ConfigDict(arbitrary_types_allowed=True)
38-
3937
current_state: CustomAgentBrain
40-
action: list[ActionModel]
4138

4239
@staticmethod
4340
def type_with_custom_actions(
4441
custom_actions: Type[ActionModel],
4542
) -> Type["CustomAgentOutput"]:
4643
"""Extend actions with custom actions"""
47-
return create_model(
44+
model_ = create_model(
4845
"CustomAgentOutput",
4946
__base__=CustomAgentOutput,
5047
action=(
5148
list[custom_actions],
52-
Field(...),
49+
Field(..., description='List of actions to execute', json_schema_extra={'min_items': 1}),
5350
), # Properly annotated field with no default
5451
__module__=CustomAgentOutput.__module__,
5552
)
53+
model_.__doc__ = 'AgentOutput model with custom actions'
54+
return model_

0 commit comments

Comments
 (0)