Skip to content

Commit 05f1991

Browse files
committed
fix: optional eval in low code model
1 parent be12b16 commit 05f1991

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

src/uipath/agent/models/agent.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,12 +309,14 @@ class BaseAgentDefinition(BaseModel):
309309
resources: List[AgentResourceConfig] = Field(
310310
..., description="List of tools, context, and escalation resources"
311311
)
312-
evaluation_sets: List[EvaluationSet] = Field(
313-
...,
312+
evaluation_sets: Optional[List[EvaluationSet]] = Field(
313+
None,
314314
alias="evaluationSets",
315315
description="List of agent evaluation sets",
316316
)
317-
evaluators: List[Evaluator] = Field(..., description="List of agent evaluators")
317+
evaluators: Optional[List[Evaluator]] = Field(
318+
None, description="List of agent evaluators"
319+
)
318320

319321
model_config = ConfigDict(
320322
validate_by_name=True, validate_by_alias=True, extra="allow"

tests/agent/models/test_agent.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,6 @@ def test_agent_config_loads_unknown_resource_json(self):
503503
"extraField": {"foo": "bar"},
504504
}
505505
],
506-
"evaluators": [],
507-
"evaluationSets": [],
508506
}
509507

510508
config: AgentDefinition = TypeAdapter(AgentDefinition).validate_python(
@@ -552,8 +550,6 @@ def test_agent_config_loads_unknown_agent_type(self):
552550
},
553551
},
554552
"resources": [],
555-
"evaluators": [],
556-
"evaluationSets": [],
557553
}
558554

559555
config: AgentDefinition = TypeAdapter(AgentDefinition).validate_python(

0 commit comments

Comments
 (0)