mirror of
https://github.com/langgenius/dify.git
synced 2025-11-30 12:53:33 +00:00
Signed-off-by: lyzno1 <yuanyouhuilyz@gmail.com> Co-authored-by: Stream <Stream_2@qq.com> Co-authored-by: lyzno1 <92089059+lyzno1@users.noreply.github.com> Co-authored-by: zhsama <torvalds@linux.do> Co-authored-by: Harry <xh001x@hotmail.com> Co-authored-by: lyzno1 <yuanyouhuilyz@gmail.com> Co-authored-by: yessenia <yessenia.contact@gmail.com> Co-authored-by: hjlarry <hjlarry@163.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: WTW0313 <twwu@dify.ai> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
53 lines
1.2 KiB
Python
53 lines
1.2 KiB
Python
from enum import StrEnum, auto
|
|
|
|
|
|
class CommonParameterType(StrEnum):
|
|
SECRET_INPUT = "secret-input"
|
|
TEXT_INPUT = "text-input"
|
|
SELECT = auto()
|
|
STRING = auto()
|
|
NUMBER = auto()
|
|
FILE = auto()
|
|
FILES = auto()
|
|
SYSTEM_FILES = "system-files"
|
|
BOOLEAN = auto()
|
|
APP_SELECTOR = "app-selector"
|
|
MODEL_SELECTOR = "model-selector"
|
|
TOOLS_SELECTOR = "array[tools]"
|
|
CHECKBOX = "checkbox"
|
|
ANY = auto()
|
|
|
|
# Dynamic select parameter
|
|
# Once you are not sure about the available options until authorization is done
|
|
# eg: Select a Slack channel from a Slack workspace
|
|
DYNAMIC_SELECT = "dynamic-select"
|
|
|
|
# TOOL_SELECTOR = "tool-selector"
|
|
# MCP object and array type parameters
|
|
ARRAY = auto()
|
|
OBJECT = auto()
|
|
|
|
|
|
class AppSelectorScope(StrEnum):
|
|
ALL = auto()
|
|
CHAT = auto()
|
|
WORKFLOW = auto()
|
|
COMPLETION = auto()
|
|
|
|
|
|
class ModelSelectorScope(StrEnum):
|
|
LLM = auto()
|
|
TEXT_EMBEDDING = "text-embedding"
|
|
RERANK = auto()
|
|
TTS = auto()
|
|
SPEECH2TEXT = auto()
|
|
MODERATION = auto()
|
|
VISION = auto()
|
|
|
|
|
|
class ToolSelectorScope(StrEnum):
|
|
ALL = auto()
|
|
CUSTOM = auto()
|
|
BUILTIN = auto()
|
|
WORKFLOW = auto()
|