mirror of
https://github.com/langgenius/dify.git
synced 2026-09-24 23:22:26 +08:00
refactor(api): Extract shared ResponseModel (#34633)
This commit is contained in:
@@ -4,21 +4,13 @@ from datetime import datetime
|
||||
from typing import Any
|
||||
|
||||
from graphon.file import File
|
||||
from pydantic import BaseModel, ConfigDict, Field, field_validator, model_validator
|
||||
from pydantic import Field, field_validator, model_validator
|
||||
|
||||
from fields.base import ResponseModel
|
||||
|
||||
type JSONValue = Any
|
||||
|
||||
|
||||
class ResponseModel(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
from_attributes=True,
|
||||
extra="ignore",
|
||||
populate_by_name=True,
|
||||
serialize_by_alias=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
class MessageFile(ResponseModel):
|
||||
id: str
|
||||
filename: str
|
||||
|
||||
Reference in New Issue
Block a user