2024-02-06 13:21:13 +08:00
|
|
|
[project]
|
|
|
|
requires-python = ">=3.10"
|
|
|
|
|
2024-06-18 13:27:03 +08:00
|
|
|
[build-system]
|
|
|
|
requires = ["poetry-core"]
|
|
|
|
build-backend = "poetry.core.masonry.api"
|
|
|
|
|
2024-02-06 13:21:13 +08:00
|
|
|
[tool.ruff]
|
|
|
|
exclude = [
|
|
|
|
]
|
|
|
|
line-length = 120
|
|
|
|
|
|
|
|
[tool.ruff.lint]
|
2024-06-17 10:04:28 +08:00
|
|
|
preview = true
|
2024-02-06 13:21:13 +08:00
|
|
|
select = [
|
2024-05-20 16:34:13 +08:00
|
|
|
"B", # flake8-bugbear rules
|
2024-02-08 14:11:10 +08:00
|
|
|
"F", # pyflakes rules
|
2024-05-20 16:34:13 +08:00
|
|
|
"I", # isort rules
|
2024-02-09 15:21:33 +08:00
|
|
|
"UP", # pyupgrade rules
|
2024-06-05 14:05:15 +08:00
|
|
|
"E101", # mixed-spaces-and-tabs
|
|
|
|
"E111", # indentation-with-invalid-multiple
|
|
|
|
"E112", # no-indented-block
|
|
|
|
"E113", # unexpected-indentation
|
|
|
|
"E115", # no-indented-block-comment
|
|
|
|
"E116", # unexpected-indentation-comment
|
|
|
|
"E117", # over-indented
|
2024-05-19 18:30:45 +08:00
|
|
|
"RUF019", # unnecessary-key-check
|
2024-06-05 14:05:15 +08:00
|
|
|
"RUF100", # unused-noqa
|
|
|
|
"RUF101", # redirected-noqa
|
2024-05-24 12:08:12 +08:00
|
|
|
"S506", # unsafe-yaml-load
|
2024-06-05 14:05:15 +08:00
|
|
|
"W191", # tab-indentation
|
2024-06-02 10:02:37 +08:00
|
|
|
"W605", # invalid-escape-sequence
|
2024-02-08 14:11:10 +08:00
|
|
|
]
|
|
|
|
ignore = [
|
|
|
|
"F403", # undefined-local-with-import-star
|
|
|
|
"F405", # undefined-local-with-import-star-usage
|
|
|
|
"F821", # undefined-name
|
|
|
|
"F841", # unused-variable
|
2024-02-09 15:21:33 +08:00
|
|
|
"UP007", # non-pep604-annotation
|
|
|
|
"UP032", # f-string
|
2024-05-20 16:34:13 +08:00
|
|
|
"B005", # strip-with-multi-characters
|
|
|
|
"B006", # mutable-argument-default
|
|
|
|
"B007", # unused-loop-control-variable
|
|
|
|
"B026", # star-arg-unpacking-after-keyword-arg
|
2024-06-06 00:42:00 +08:00
|
|
|
"B901", # return-in-generator
|
2024-05-20 16:34:13 +08:00
|
|
|
"B904", # raise-without-from-inside-except
|
|
|
|
"B905", # zip-without-explicit-strict
|
2024-02-06 13:21:13 +08:00
|
|
|
]
|
2024-04-18 13:43:15 +08:00
|
|
|
|
2024-04-18 20:24:05 +08:00
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
|
|
"app.py" = [
|
|
|
|
"F401", # unused-import
|
|
|
|
"F811", # redefined-while-unused
|
|
|
|
]
|
|
|
|
"__init__.py" = [
|
|
|
|
"F401", # unused-import
|
|
|
|
"F811", # redefined-while-unused
|
|
|
|
]
|
|
|
|
"tests/*" = [
|
|
|
|
"F401", # unused-import
|
|
|
|
"F811", # redefined-while-unused
|
|
|
|
]
|
|
|
|
|
2024-06-26 16:30:28 +08:00
|
|
|
[tool.ruff.format]
|
|
|
|
quote-style = "single"
|
2024-04-18 13:43:15 +08:00
|
|
|
|
|
|
|
[tool.pytest_env]
|
|
|
|
OPENAI_API_KEY = "sk-IamNotARealKeyJustForMockTestKawaiiiiiiiiii"
|
|
|
|
AZURE_OPENAI_API_BASE = "https://difyai-openai.openai.azure.com"
|
|
|
|
AZURE_OPENAI_API_KEY = "xxxxb1707exxxxxxxxxxaaxxxxxf94"
|
|
|
|
ANTHROPIC_API_KEY = "sk-ant-api11-IamNotARealKeyJustForMockTestKawaiiiiiiiiii-NotBaka-ASkksz"
|
|
|
|
CHATGLM_API_BASE = "http://a.abc.com:11451"
|
|
|
|
XINFERENCE_SERVER_URL = "http://a.abc.com:11451"
|
|
|
|
XINFERENCE_GENERATION_MODEL_UID = "generate"
|
|
|
|
XINFERENCE_CHAT_MODEL_UID = "chat"
|
|
|
|
XINFERENCE_EMBEDDINGS_MODEL_UID = "embedding"
|
|
|
|
XINFERENCE_RERANK_MODEL_UID = "rerank"
|
|
|
|
GOOGLE_API_KEY = "abcdefghijklmnopqrstuvwxyz"
|
|
|
|
HUGGINGFACE_API_KEY = "hf-awuwuwuwuwuwuwuwuwuwuwuwuwuwuwuwuwu"
|
|
|
|
HUGGINGFACE_TEXT_GEN_ENDPOINT_URL = "a"
|
|
|
|
HUGGINGFACE_TEXT2TEXT_GEN_ENDPOINT_URL = "b"
|
|
|
|
HUGGINGFACE_EMBEDDINGS_ENDPOINT_URL = "c"
|
|
|
|
MOCK_SWITCH = "true"
|
2024-05-03 08:54:40 +08:00
|
|
|
CODE_MAX_STRING_LENGTH = "80000"
|
|
|
|
CODE_EXECUTION_ENDPOINT="http://127.0.0.1:8194"
|
|
|
|
CODE_EXECUTION_API_KEY="dify-sandbox"
|
2024-06-15 02:46:02 +08:00
|
|
|
FIRECRAWL_API_KEY = "fc-"
|
|
|
|
|
2024-06-11 13:11:28 +08:00
|
|
|
[tool.poetry]
|
|
|
|
name = "dify-api"
|
2024-06-11 22:21:18 +08:00
|
|
|
package-mode = false
|
2024-06-11 13:11:28 +08:00
|
|
|
|
|
|
|
[tool.poetry.dependencies]
|
|
|
|
python = "^3.10"
|
2024-06-11 22:21:18 +08:00
|
|
|
beautifulsoup4 = "4.12.2"
|
|
|
|
flask = "~3.0.1"
|
|
|
|
flask-sqlalchemy = "~3.0.5"
|
|
|
|
sqlalchemy = "~2.0.29"
|
|
|
|
flask-compress = "~1.14"
|
|
|
|
flask-login = "~0.6.3"
|
|
|
|
flask-migrate = "~4.0.5"
|
|
|
|
flask-restful = "~0.3.10"
|
|
|
|
flask-cors = "~4.0.0"
|
|
|
|
gunicorn = "~22.0.0"
|
|
|
|
gevent = "~23.9.1"
|
|
|
|
openai = "~1.29.0"
|
|
|
|
tiktoken = "~0.7.0"
|
|
|
|
psycopg2-binary = "~2.9.6"
|
2024-06-11 13:11:28 +08:00
|
|
|
pycryptodome = "3.19.1"
|
|
|
|
python-dotenv = "1.0.0"
|
2024-06-14 03:55:40 +08:00
|
|
|
authlib = "1.3.1"
|
2024-06-11 22:21:18 +08:00
|
|
|
boto3 = "1.28.17"
|
|
|
|
cachetools = "~5.3.0"
|
|
|
|
weaviate-client = "~3.21.0"
|
|
|
|
mailchimp-transactional = "~1.0.50"
|
2024-06-11 13:11:28 +08:00
|
|
|
scikit-learn = "1.2.2"
|
2024-06-11 22:21:18 +08:00
|
|
|
sentry-sdk = {version = "~1.39.2", extras = ["flask"]}
|
2024-06-11 13:11:28 +08:00
|
|
|
sympy = "1.12"
|
|
|
|
jieba = "0.42.1"
|
2024-06-11 22:21:18 +08:00
|
|
|
celery = "~5.3.6"
|
|
|
|
redis = {version = "~5.0.3", extras = ["hiredis"]}
|
|
|
|
chardet = "~5.1.0"
|
|
|
|
python-docx = "~1.1.0"
|
|
|
|
pypdfium2 = "~4.17.0"
|
|
|
|
resend = "~0.7.0"
|
|
|
|
pyjwt = "~2.8.0"
|
|
|
|
anthropic = "~0.23.1"
|
2024-06-11 13:11:28 +08:00
|
|
|
newspaper3k = "0.2.8"
|
|
|
|
wikipedia = "1.4.0"
|
|
|
|
readabilipy = "0.2.0"
|
|
|
|
google-ai-generativelanguage = "0.6.1"
|
2024-06-11 22:21:18 +08:00
|
|
|
google-api-core = "2.18.0"
|
|
|
|
google-api-python-client = "2.90.0"
|
|
|
|
google-auth = "2.29.0"
|
2024-06-11 13:11:28 +08:00
|
|
|
google-auth-httplib2 = "0.2.0"
|
|
|
|
google-generativeai = "0.5.0"
|
|
|
|
googleapis-common-protos = "1.63.0"
|
|
|
|
google-cloud-storage = "2.16.0"
|
2024-06-11 22:21:18 +08:00
|
|
|
replicate = "~0.22.0"
|
|
|
|
websocket-client = "~1.7.0"
|
|
|
|
dashscope = {version = "~1.17.0", extras = ["tokenizer"]}
|
|
|
|
huggingface-hub = "~0.16.4"
|
|
|
|
transformers = "~4.35.0"
|
|
|
|
tokenizers = "~0.15.0"
|
|
|
|
pandas = { version = "~2.2.2", extras = ["performance", "excel"] }
|
2024-06-11 13:11:28 +08:00
|
|
|
xinference-client = "0.9.4"
|
2024-06-11 22:21:18 +08:00
|
|
|
safetensors = "~0.4.3"
|
2024-06-11 13:11:28 +08:00
|
|
|
zhipuai = "1.0.7"
|
2024-06-11 22:21:18 +08:00
|
|
|
werkzeug = "~3.0.1"
|
2024-06-20 11:18:05 +08:00
|
|
|
pymilvus = "2.3.1"
|
2024-06-11 13:11:28 +08:00
|
|
|
qdrant-client = "1.7.3"
|
2024-06-11 22:21:18 +08:00
|
|
|
cohere = "~5.2.4"
|
|
|
|
pyyaml = "~6.0.1"
|
|
|
|
numpy = "~1.26.4"
|
|
|
|
unstructured = {version = "~0.10.27", extras = ["docx", "epub", "md", "msg", "ppt", "pptx"]}
|
|
|
|
bs4 = "~0.0.1"
|
|
|
|
markdown = "~3.5.1"
|
2024-06-18 14:05:14 +08:00
|
|
|
httpx = {version = "~0.27.0", extras = ["socks"]}
|
2024-06-11 22:21:18 +08:00
|
|
|
matplotlib = "~3.8.2"
|
|
|
|
yfinance = "~0.2.40"
|
|
|
|
pydub = "~0.25.1"
|
|
|
|
gmpy2 = "~2.1.5"
|
|
|
|
numexpr = "~2.9.0"
|
|
|
|
duckduckgo-search = "~6.1.5"
|
2024-06-11 13:11:28 +08:00
|
|
|
arxiv = "2.1.0"
|
2024-06-11 22:21:18 +08:00
|
|
|
yarl = "~1.9.4"
|
|
|
|
twilio = "~9.0.4"
|
|
|
|
qrcode = "~7.4.2"
|
|
|
|
azure-storage-blob = "12.13.0"
|
2024-06-14 03:24:32 +08:00
|
|
|
azure-identity = "1.16.1"
|
2024-06-11 13:11:28 +08:00
|
|
|
lxml = "5.1.0"
|
2024-06-11 22:21:18 +08:00
|
|
|
xlrd = "~2.0.1"
|
2024-06-14 15:05:17 +08:00
|
|
|
pydantic = "~2.7.4"
|
|
|
|
pydantic_extra_types = "~2.8.1"
|
2024-06-19 13:41:12 +08:00
|
|
|
pydantic-settings = "~2.3.3"
|
2024-06-11 13:11:28 +08:00
|
|
|
pgvecto-rs = "0.1.4"
|
|
|
|
firecrawl-py = "0.0.5"
|
2024-06-11 22:21:18 +08:00
|
|
|
oss2 = "2.18.5"
|
2024-06-11 13:11:28 +08:00
|
|
|
pgvector = "0.2.5"
|
2024-06-11 22:21:18 +08:00
|
|
|
pymysql = "1.1.1"
|
|
|
|
tidb-vector = "0.0.9"
|
2024-06-11 13:11:28 +08:00
|
|
|
google-cloud-aiplatform = "1.49.0"
|
2024-06-11 22:21:18 +08:00
|
|
|
vanna = {version = "0.5.5", extras = ["postgres", "mysql", "clickhouse", "duckdb"]}
|
2024-06-11 13:11:28 +08:00
|
|
|
kaleido = "0.2.1"
|
2024-06-13 00:06:05 +08:00
|
|
|
tencentcloud-sdk-python-hunyuan = "~3.0.1158"
|
2024-06-14 19:25:17 +08:00
|
|
|
tcvectordb = "1.3.2"
|
2024-06-18 14:05:14 +08:00
|
|
|
chromadb = "~0.5.1"
|
2024-06-17 18:03:42 +08:00
|
|
|
tenacity = "~8.3.0"
|
2024-06-17 19:18:52 +08:00
|
|
|
cos-python-sdk-v5 = "1.9.30"
|
2024-06-26 17:33:29 +08:00
|
|
|
langfuse = "^2.36.1"
|
|
|
|
langsmith = "^0.1.77"
|
2024-06-18 14:52:20 +08:00
|
|
|
novita-client = "^0.5.6"
|
2024-06-19 12:44:33 +08:00
|
|
|
opensearch-py = "2.4.0"
|
2024-06-22 01:48:07 +08:00
|
|
|
oracledb = "~2.2.1"
|
2024-06-11 13:11:28 +08:00
|
|
|
|
2024-06-12 14:43:03 +08:00
|
|
|
[tool.poetry.group.dev]
|
|
|
|
optional = true
|
2024-06-11 13:11:28 +08:00
|
|
|
|
|
|
|
[tool.poetry.group.dev.dependencies]
|
2024-06-11 22:21:18 +08:00
|
|
|
coverage = "~7.2.4"
|
|
|
|
pytest = "~8.1.1"
|
|
|
|
pytest-benchmark = "~4.0.0"
|
|
|
|
pytest-env = "~1.1.3"
|
|
|
|
pytest-mock = "~3.14.0"
|
2024-06-12 14:43:03 +08:00
|
|
|
|
|
|
|
[tool.poetry.group.lint]
|
|
|
|
optional = true
|
|
|
|
|
|
|
|
[tool.poetry.group.lint.dependencies]
|
|
|
|
ruff = "~0.4.8"
|
|
|
|
dotenv-linter = "~0.5.0"
|