109 lines
2.6 KiB
TOML
109 lines
2.6 KiB
TOML
[build-system]
|
||
requires = ["setuptools>=61.0", "wheel"]
|
||
build-backend = "setuptools.build_meta"
|
||
|
||
[project]
|
||
name = "ichangzuo-rag-service"
|
||
version = "1.0.0"
|
||
description = "Python FastAPI RAG service for Changzuo Q&A system"
|
||
readme = "README.md"
|
||
requires-python = ">=3.11"
|
||
license = {text = "MIT"}
|
||
authors = [
|
||
{name = "Changzuo Team", email = "team@ichangzuo.com"}
|
||
]
|
||
classifiers = [
|
||
"Development Status :: 4 - Beta",
|
||
"Intended Audience :: Developers",
|
||
"License :: OSI Approved :: MIT License",
|
||
"Programming Language :: Python :: 3.11",
|
||
"Programming Language :: Python :: 3.12",
|
||
]
|
||
dependencies = [
|
||
# Web 框架
|
||
"fastapi==0.141.1",
|
||
"uvicorn[standard]==0.52.4",
|
||
"pydantic==2.13.5",
|
||
"pydantic-settings==2.15.0",
|
||
|
||
# 向量数据库 - ChromaDB 1.5+
|
||
"chromadb==1.5.9",
|
||
|
||
# SQLite3 兼容层 (Linux 系统自带 sqlite3 版本过低时 ChromaDB 需要 >= 3.35.0;Windows 无此 wheel,main.py 自动回退)
|
||
"pysqlite3-binary==0.5.4; sys_platform != 'win32'",
|
||
|
||
# Ollama 客户端 (仅用于嵌入)
|
||
"ollama==0.6.2",
|
||
|
||
# LangChain 集成 (现代版本,兼容 langchain-core 1.x)
|
||
"langchain-ollama==1.1.0",
|
||
"langchain-chroma==1.1.0",
|
||
|
||
# LLM 编排
|
||
"langgraph==1.2.11",
|
||
"langchain==1.4.0",
|
||
"langchain-community==0.4.2",
|
||
"langchain-core==1.6.2",
|
||
"langchain-text-splitters==1.1.2",
|
||
"langchain-openai==1.6.0",
|
||
|
||
# 文档处理
|
||
"chardet==7.6.0",
|
||
|
||
# 中文分词 (置信度计算用)
|
||
"jieba==0.42.1",
|
||
|
||
# 重排
|
||
"bm25s==0.3.11",
|
||
|
||
# 实用工具
|
||
"python-multipart==0.0.32",
|
||
"python-dotenv==1.2.3",
|
||
|
||
# TypeSafe 回答打分(独立裁判)
|
||
"typesafe-sdk==0.7.0",
|
||
]
|
||
|
||
[project.optional-dependencies]
|
||
dev = [
|
||
"pytest==8.2.0",
|
||
"pytest-asyncio==0.23.3",
|
||
"httpx==0.27.0",
|
||
"ruff==0.4.0",
|
||
"mypy==1.10.0",
|
||
]
|
||
|
||
[project.urls]
|
||
Homepage = "https://github.com/ichangzuo/rag-service"
|
||
Repository = "https://github.com/ichangzuo/rag-service"
|
||
Issues = "https://github.com/ichangzuo/rag-service/issues"
|
||
|
||
[tool.setuptools.packages.find]
|
||
where = ["."]
|
||
include = ["app*"]
|
||
|
||
[tool.ruff]
|
||
line-length = 100
|
||
target-version = "py311"
|
||
select = ["E", "F", "I", "W", "UP", "B", "C4", "SIM", "T20"]
|
||
ignore = ["E501", "SIM103"]
|
||
fixable = ["ALL"]
|
||
unfixable = ["T20"]
|
||
|
||
[tool.ruff.format]
|
||
quote-style = "double"
|
||
indent-style = "space"
|
||
|
||
[tool.mypy]
|
||
python_version = "3.11"
|
||
warn_return_any = true
|
||
warn_unused_configs = true
|
||
disallow_untyped_defs = false
|
||
ignore_missing_imports = true
|
||
|
||
[tool.pytest.ini_options]
|
||
asyncio_mode = "auto"
|
||
testpaths = ["tests"]
|
||
python_files = ["test_*.py"]
|
||
python_classes = ["Test*"]
|
||
python_functions = ["test_*"] |