mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-05-13 06:48:15 +08:00
41 lines
1.2 KiB
Python
41 lines
1.2 KiB
Python
from configs import dify_config
|
|
|
|
HIDDEN_VALUE = "[__HIDDEN__]"
|
|
UUID_NIL = "00000000-0000-0000-0000-000000000000"
|
|
|
|
DEFAULT_FILE_NUMBER_LIMITS = 3
|
|
|
|
IMAGE_EXTENSIONS = ["jpg", "jpeg", "png", "webp", "gif", "svg"]
|
|
IMAGE_EXTENSIONS.extend([ext.upper() for ext in IMAGE_EXTENSIONS])
|
|
|
|
VIDEO_EXTENSIONS = ["mp4", "mov", "mpeg", "mpga"]
|
|
VIDEO_EXTENSIONS.extend([ext.upper() for ext in VIDEO_EXTENSIONS])
|
|
|
|
AUDIO_EXTENSIONS = ["mp3", "m4a", "wav", "webm", "amr"]
|
|
AUDIO_EXTENSIONS.extend([ext.upper() for ext in AUDIO_EXTENSIONS])
|
|
|
|
|
|
if dify_config.ETL_TYPE == "Unstructured":
|
|
DOCUMENT_EXTENSIONS = ["txt", "markdown", "md", "mdx", "pdf", "html", "htm", "xlsx", "xls", "vtt", "properties"]
|
|
DOCUMENT_EXTENSIONS.extend(("doc", "docx", "csv", "eml", "msg", "pptx", "xml", "epub"))
|
|
if dify_config.UNSTRUCTURED_API_URL:
|
|
DOCUMENT_EXTENSIONS.append("ppt")
|
|
DOCUMENT_EXTENSIONS.extend([ext.upper() for ext in DOCUMENT_EXTENSIONS])
|
|
else:
|
|
DOCUMENT_EXTENSIONS = [
|
|
"txt",
|
|
"markdown",
|
|
"md",
|
|
"mdx",
|
|
"pdf",
|
|
"html",
|
|
"htm",
|
|
"xlsx",
|
|
"xls",
|
|
"docx",
|
|
"csv",
|
|
"vtt",
|
|
"properties",
|
|
]
|
|
DOCUMENT_EXTENSIONS.extend([ext.upper() for ext in DOCUMENT_EXTENSIONS])
|