Skip to content

Commit 94be50a

Browse files
committed
fix: need to validate pydantic for the config
1 parent acbf1a1 commit 94be50a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

evaluation_function/evaluation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def validate_fsa(value: str | dict) -> Tuple[FSA, Params]:
1111
"""Parse a FSA from JSON string or dict."""
1212
if isinstance(value, str):
1313
return FSAFrontend.model_validate_json(value).toFSA()
14-
return FSAFrontend.model_validate(value).toFSA(), json.loads(FSAFrontend.model_validate(value).config)
14+
return FSAFrontend.model_validate(value).toFSA(), Params.model_validate_json(FSAFrontend.model_validate(value).config)
1515

1616
def evaluation_function(
1717
response: Any = None,

0 commit comments

Comments
 (0)