Skip to content

Commit 076092f

Browse files
committed
fix template
1 parent 6a6d610 commit 076092f

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
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
@@ -1142,9 +1142,10 @@ def process_document_section(self, document: Document, section_id: str) -> Docum
11421142
# Update the section in the document with confidence threshold alerts
11431143
for doc_section in document.sections:
11441144
if doc_section.section_id == section_id:
1145-
# Convert ConfidenceAlert objects to dicts
1145+
# Convert ConfidenceAlert objects to dicts with camelCase keys for UI
11461146
doc_section.confidence_threshold_alerts = [
1147-
alert.model_dump() for alert in confidence_threshold_alerts
1147+
alert.model_dump(by_alias=True)
1148+
for alert in confidence_threshold_alerts
11481149
]
11491150
break
11501151

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.

0 commit comments

Comments
 (0)