123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- [project]
- requires-python = ">=3.10"
- [tool.ruff]
- exclude = [
- ]
- line-length = 120
- [tool.ruff.lint]
- select = [
- "B", # flake8-bugbear rules
- "F", # pyflakes rules
- "I", # isort rules
- "UP", # pyupgrade rules
- "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
- "RUF019", # unnecessary-key-check
- "RUF100", # unused-noqa
- "RUF101", # redirected-noqa
- "S506", # unsafe-yaml-load
- "W191", # tab-indentation
- "W605", # invalid-escape-sequence
- ]
- ignore = [
- "F403", # undefined-local-with-import-star
- "F405", # undefined-local-with-import-star-usage
- "F821", # undefined-name
- "F841", # unused-variable
- "UP007", # non-pep604-annotation
- "UP032", # f-string
- "B005", # strip-with-multi-characters
- "B006", # mutable-argument-default
- "B007", # unused-loop-control-variable
- "B026", # star-arg-unpacking-after-keyword-arg
- "B901", # return-in-generator
- "B904", # raise-without-from-inside-except
- "B905", # zip-without-explicit-strict
- ]
- [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
- ]
- [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"
- CODE_MAX_STRING_LENGTH = "80000"
- CODE_EXECUTION_ENDPOINT="http://127.0.0.1:8194"
- CODE_EXECUTION_API_KEY="dify-sandbox"
- [tool.poetry]
- name = "dify-api"
- version = "0.6.10"
- description = ""
- authors = ["Dify <hello@dify.ai>"]
- readme = "README.md"
- [tool.poetry.dependencies]
- python = "^3.10"
- 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"
- pycryptodome = "3.19.1"
- python-dotenv = "1.0.0"
- authlib = "1.2.0"
- boto3 = "^1.28.17"
- tenacity = "^8.2.2"
- cachetools = "^5.3.0"
- weaviate-client = "^3.21.0"
- mailchimp-transactional = "^1.0.50"
- scikit-learn = "1.2.2"
- sentry-sdk = {version = "^1.39.2", extras = ["flask"]}
- sympy = "1.12"
- jieba = "0.42.1"
- celery = "^5.3.6"
- redis = {version = "^5.0.3", extras = ["hiredis"]}
- openpyxl = "3.1.2"
- 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"
- newspaper3k = "0.2.8"
- wikipedia = "1.4.0"
- readabilipy = "0.2.0"
- google-ai-generativelanguage = "0.6.1"
- google-api-core = "^2.18.0"
- google-api-python-client = "^2.90.0"
- google-auth = "^2.29.0"
- google-auth-httplib2 = "0.2.0"
- google-generativeai = "0.5.0"
- google-search-results = "2.4.2"
- googleapis-common-protos = "1.63.0"
- google-cloud-storage = "2.16.0"
- 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 = "1.5.3"
- xinference-client = "0.9.4"
- safetensors = "^0.4.3"
- zhipuai = "1.0.7"
- werkzeug = "^3.0.1"
- pymilvus = "2.3.1"
- qdrant-client = "1.7.3"
- 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"
- httpx = {version = "^0.24.1", extras = ["socks"]}
- matplotlib = "^3.8.2"
- yfinance = "^0.2.35"
- pydub = "^0.25.1"
- gmpy2 = "^2.1.5"
- numexpr = "^2.9.0"
- duckduckgo-search = "5.2.2"
- arxiv = "2.1.0"
- yarl = "^1.9.4"
- twilio = "^9.0.4"
- qrcode = "^7.4.2"
- azure-storage-blob = "12.9.0"
- azure-identity = "1.15.0"
- lxml = "5.1.0"
- xlrd = "^2.0.1"
- pydantic = "^1.10.0"
- pgvecto-rs = "0.1.4"
- firecrawl-py = "0.0.5"
- oss2 = "2.15.0"
- pgvector = "0.2.5"
- pymysql = "^1.1.1"
- tidb-vector = "^0.0.9"
- google-cloud-aiplatform = "1.49.0"
- vanna = {version = "==0.5.5", extras = ["postgres", "mysql", "clickhouse", "duckdb"]}
- kaleido = "0.2.1"
- [tool.poetry.group.dev.dependencies]
- coverage = "^7.2.4"
- pytest = "^8.1.1"
- pytest-benchmark = "^4.0.0"
- pytest-env = "^1.1.3"
- pytest-mock = "^3.14.0"
|