2024-02-06 13:21:13 +08:00
|
|
|
[project]
|
|
|
|
requires-python = ">=3.10"
|
|
|
|
|
|
|
|
[tool.ruff]
|
|
|
|
exclude = [
|
|
|
|
]
|
|
|
|
line-length = 120
|
|
|
|
|
|
|
|
[tool.ruff.lint]
|
|
|
|
ignore-init-module-imports = true
|
|
|
|
select = [
|
2024-02-08 14:11:10 +08:00
|
|
|
"F", # pyflakes rules
|
2024-02-06 13:21:13 +08:00
|
|
|
"I001", # unsorted-imports
|
|
|
|
"I002", # missing-required-import
|
2024-02-09 15:21:33 +08:00
|
|
|
"UP", # pyupgrade rules
|
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-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-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"
|
|
|
|
CODE_MAX_STRING_LENGTH = "80000"
|