dify/api/core/tools/entities/file_entities.py

19 lines
389 B
Python
Raw Normal View History

2024-10-22 17:26:00 +08:00
from pydantic import BaseModel
from core.file.constants import FILE_MODEL_IDENTITY
2024-12-03 16:28:36 +08:00
from core.file.enums import FileType
2024-10-22 17:26:00 +08:00
class PluginFileEntity(BaseModel):
"""
File entity for plugin tool.
"""
dify_model_identity: str = FILE_MODEL_IDENTITY
2024-12-03 16:28:36 +08:00
mime_type: str | None
filename: str | None
extension: str | None
size: int | None
2024-12-03 16:28:36 +08:00
type: FileType
2024-10-22 17:26:00 +08:00
url: str