mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-09 19:06:51 +08:00
fix(core): Reorder field_validator and classmethod to fit Pydantic V2. (#5257)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user