Skip to content

Commit 3e8c067

Browse files
committed
fix template
1 parent ba50772 commit 3e8c067

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

lib/idp_common_pkg/idp_common/assessment/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ class Geometry(BaseModel):
110110
class ConfidenceAlert(BaseModel):
111111
"""Alert for confidence threshold violation."""
112112

113-
attribute_name: str
113+
attribute_name: str = Field(serialization_alias="attributeName")
114114
confidence: float
115-
confidence_threshold: float
115+
confidence_threshold: float = Field(serialization_alias="confidenceThreshold")
116116

117117
@field_validator("confidence", "confidence_threshold", mode="before")
118118
@classmethod

lib/idp_common_pkg/idp_common/assessment/service.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,9 +1144,10 @@ def process_document_section(self, document: Document, section_id: str) -> Docum
11441144
# Update the section in the document with confidence threshold alerts
11451145
for doc_section in document.sections:
11461146
if doc_section.section_id == section_id:
1147-
# Convert ConfidenceAlert objects to dicts
1147+
# Convert ConfidenceAlert objects to dicts with camelCase keys for UI
11481148
doc_section.confidence_threshold_alerts = [
1149-
alert.model_dump() for alert in confidence_threshold_alerts
1149+
alert.model_dump(by_alias=True)
1150+
for alert in confidence_threshold_alerts
11501151
]
11511152
break
11521153

lib/idp_common_pkg/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ dependencies = [
2626
"pydantic>=2.12.0",
2727
"deepdiff>=6.0.0",
2828
"mypy-boto3-bedrock-runtime>=1.40.76",
29+
"aws-lambda-powertools>=3.21.0",
2930
]
3031
readme = "README.md"
3132
classifiers = [

lib/idp_common_pkg/uv.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

patterns/pattern-2/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,7 @@ Resources:
927927
review_agent_model:
928928
type: string
929929
description: Model to review the initial extraction agents work and correct it if needed, if not specified will default to the same as the extraction model.
930-
default: Null
930+
default: ""
931931
image:
932932
type: object
933933
sectionLabel: Image Processing Settings

0 commit comments

Comments
 (0)