feat: add supports for multimodal

This commit is contained in:
Yeuoly
2024-10-22 17:26:00 +08:00
parent 11270a7ef2
commit 1450e5d5cb
10 changed files with 59 additions and 7 deletions

View 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

View File

@ -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 {