fix(core): Reorder field_validator and classmethod to fit Pydantic V2. (#5257)
This commit is contained in:
parent
e95f8fa3dc
commit
5a99aeb864
11 changed files with 17 additions and 15 deletions
|
|
@ -124,6 +124,7 @@ class AssistantPromptMessage(PromptMessage):
|
|||
function: ToolCallFunction
|
||||
|
||||
@field_validator('id', mode='before')
|
||||
@classmethod
|
||||
def transform_id_to_str(cls, value) -> str:
|
||||
if not isinstance(value, str):
|
||||
return str(value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue