mirror of
https://github.com/langgenius/dify-plugin-sdks.git
synced 2026-08-26 18:56:41 -04:00
f902504af0
* Inline multimodal entities into existing models * apply ruff * bump to 0.7.0b1 * fix: remove tenant_id from invoke_multimodal_embedding * tests: add rerank * apply ruff * fix * fix: typing
35 lines
930 B
Python
35 lines
930 B
Python
from enum import Enum
|
|
|
|
|
|
class InvokeType(Enum):
|
|
Tool = "tool"
|
|
LLM = "llm"
|
|
LLMStructuredOutput = "llm_structured_output"
|
|
TextEmbedding = "text_embedding"
|
|
MultimodalEmbedding = "multimodal_embedding"
|
|
Rerank = "rerank"
|
|
MultimodalRerank = "multimodal_rerank"
|
|
TTS = "tts"
|
|
Speech2Text = "speech2text"
|
|
Moderation = "moderation"
|
|
NodeParameterExtractor = "node_parameter_extractor"
|
|
NodeQuestionClassifier = "node_question_classifier"
|
|
App = "app"
|
|
Storage = "storage"
|
|
UploadFile = "upload_file"
|
|
SYSTEM_SUMMARY = "system_summary"
|
|
FetchApp = "fetch_app"
|
|
|
|
@classmethod
|
|
def value_of(cls, value: str) -> "InvokeType":
|
|
"""
|
|
Get value of given mode.
|
|
|
|
:param value: type
|
|
:return: mode
|
|
"""
|
|
for mode in cls:
|
|
if mode.value == value:
|
|
return mode
|
|
raise ValueError(f"invalid type value {value}")
|