mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 02:18:08 +08:00
feat: add supports for multimodal
This commit is contained in:
12
api/core/tools/entities/file_entities.py
Normal file
12
api/core/tools/entities/file_entities.py
Normal file
@ -0,0 +1,12 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
from core.file.constants import FILE_MODEL_IDENTITY
|
||||
|
||||
|
||||
class PluginFileEntity(BaseModel):
|
||||
"""
|
||||
File entity for plugin tool.
|
||||
"""
|
||||
|
||||
dify_model_identity: str = FILE_MODEL_IDENTITY
|
||||
url: str
|
||||
@ -208,10 +208,10 @@ class ToolParameter(BaseModel):
|
||||
SELECT = CommonParameterType.SELECT.value
|
||||
SECRET_INPUT = CommonParameterType.SECRET_INPUT.value
|
||||
FILE = CommonParameterType.FILE.value
|
||||
FILES = "files"
|
||||
FILES = CommonParameterType.FILES.value
|
||||
|
||||
# deprecated, should not use.
|
||||
SYSTEM_FILES = "systme-files"
|
||||
SYSTEM_FILES = CommonParameterType.SYSTEM_FILES.value
|
||||
|
||||
def as_normal_type(self):
|
||||
if self in {
|
||||
|
||||
Reference in New Issue
Block a user