-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
47 lines (41 loc) · 1.47 KB
/
Copy pathpyproject.toml
File metadata and controls
47 lines (41 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
[project]
name = "rag-tutorial"
version = "0.1.0"
description = "RAG(检索增强生成)系统化学习教程:从零实现 + 框架对比,多提供方抽象封装"
readme = "README.md"
requires-python = ">=3.11"
authors = [{ name = "RAG Tutorial Learner" }]
license = { text = "MIT" }
# 核心依赖:贯穿全教程的共享抽象层所需
dependencies = [
"openai>=1.40", # 统一通过 OpenAI 兼容接口接入各提供方
"numpy>=1.26",
"python-dotenv>=1.0",
"tiktoken>=0.7", # token 计数 / 分块
"httpx>=0.27",
"rich>=13.7", # 终端美化输出
]
[dependency-groups]
# 各章节可选依赖,用 `uv sync --group ch02` 按需安装
ch02 = ["pypdf>=4.0", "beautifulsoup4>=4.12", "markdown>=3.6"]
ch03 = ["langchain-text-splitters>=0.2"]
ch04 = ["sentence-transformers>=3.0", "scikit-learn>=1.5"]
ch05 = ["faiss-cpu>=1.8", "chromadb>=0.5"]
ch06 = ["rank-bm25>=0.2"]
ch07 = ["sentence-transformers>=3.0"]
ch10 = ["networkx>=3.3"]
ch11 = ["langgraph>=0.2", "langchain>=0.3", "langchain-openai>=0.2"]
ch12 = ["ragas>=0.2", "datasets>=2.20"]
ch13 = ["fastapi>=0.115", "uvicorn[standard]>=0.30"]
dev = ["pytest>=8.0", "ipykernel>=6.29"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/rag_tutorial"]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src"]
[tool.uv]
# 默认安装核心依赖 + dev 组;章节依赖按需 --group 安装
default-groups = ["dev"]