Skip to content

Commit e89b712

Browse files
committed
input fix for assessment submit
1 parent 1ae3254 commit e89b712

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/idp_common_pkg/idp_common/assessment/strands_tools.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
from pydantic import BaseModel, Field
1313
from strands import Agent, tool
1414

15-
from idp_common.assessment.strands_models import AssessmentOutput, BoundingBox
15+
from idp_common.assessment.strands_models import (
16+
BoundingBox,
17+
ConfidenceAssessment,
18+
)
1619
from idp_common.utils.grid_overlay import draw_bounding_boxes
1720
from idp_common.utils.strands_agent_tools.todo_list import (
1821
create_todo_list,
@@ -36,7 +39,7 @@ class ViewImageInput(BaseModel):
3639

3740

3841
@tool
39-
def submit_assessment(assessment: AssessmentOutput, agent: Agent) -> str:
42+
def submit_assessment(assessment: ConfidenceAssessment, agent: Agent) -> str:
4043
"""
4144
Submit your final confidence assessment.
4245
@@ -54,7 +57,7 @@ def submit_assessment(assessment: AssessmentOutput, agent: Agent) -> str:
5457
Success confirmation message or validation error details
5558
"""
5659
# Validate assessment structure and return helpful errors
57-
validated_assessment = AssessmentOutput.model_validate(assessment)
60+
validated_assessment = ConfidenceAssessment.model_validate(assessment)
5861

5962
# Store in agent state
6063
agent.state.set("assessment_output", validated_assessment.model_dump(mode="json"))

0 commit comments

Comments
 (0)