Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
163 lines (144 loc) · 4.65 KB
/
Copy pathpyproject.toml
File metadata and controls
163 lines (144 loc) · 4.65 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "hello-agents"
version = "0.2.8"
description = "灵活、可扩展的多智能体框架 - 基于OpenAI原生API"
readme = "README.md"
license = {text = "CC-BY-NC-SA-4.0"}
authors = [
{name = "HelloAgents Team", email = "jjyaoao@126.com"}
]
requires-python = ">=3.10"
dependencies = [
# 核心依赖
"openai>=1.0.0,<2.0.0",
"requests>=2.25.0,<3.0.0",
"python-dotenv>=0.19.0,<2.0.0",
"pydantic>=2.0.0,<3.0.0",
# 基础工具库
"beautifulsoup4>=4.9.0,<5.0.0",
"numpy>=2.0.0,<3.0.0",
"networkx>=2.6.0,<4.0.0",
"tiktoken>=0.5.0",
]
[project.optional-dependencies]
# 搜索功能依赖
search = [
"tavily-python>=0.7.12",
"google-search-results>=2.4.2",
]
# 记忆系统依赖
memory = [
"qdrant-client>=1.9.0", # 向量数据库(已兼容1.16.0+新API)
"neo4j>=5.0.0", # 图数据库
"spacy>=3.4.0", # NLP和实体识别
"scikit-learn>=1.0.0", # 机器学习工具
]
# RAG系统依赖
rag = [
"scikit-learn>=1.0.0", # TF-IDF支持
"transformers>=4.20.0", # Transformer模型
"torch>=1.12.0", # PyTorch
"sentence-transformers>=2.2.0", # 句子嵌入
"markitdown>=0.0.1", # 文档转换
"pypdf>=3.9.0", # PDF处理
"pdfminer.six>=20221105", # PDF解析备选
]
# 协议支持依赖
protocols = [
"fastmcp>=2.0.0,<3.0.0", # MCP 协议支持
"a2a-sdk>=0.1.0", # A2A 协议支持(可选)
]
# 评估系统依赖(不含BFCL)
evaluation = [
"datasets>=2.14.0", # HuggingFace数据集加载
"huggingface_hub>=0.20.0,<1.0.0", # HuggingFace Hub API
"evaluate>=0.4.0,<1.0.0", # 评估工具
"pandas>=2.0.0,<3.0.0", # 数据处理和分析
"matplotlib>=3.7.0,<4.0.0", # 可视化(可选)
"seaborn>=0.12.0,<1.0.0", # 高级可视化(可选)
"tqdm>=4.65.0,<5.0.0", # 进度条显示
"gradio>=4.0.0,<5.0.0", # 人工验证界面
]
# BFCL评估依赖(⚠️ bfcl-eval强制要求numpy==1.26.4,与主依赖numpy>=2.0冲突)
# ⚠️ 此组已禁用,无法通过 pip install hello-agents[evaluation-bfcl] 安装
#
# 使用方法:在独立虚拟环境中手动安装
# uv venv .venv-bfcl
# source .venv-bfcl/bin/activate # Windows: .venv-bfcl\Scripts\activate
# uv pip install openai requests python-dotenv pydantic beautifulsoup4 networkx
# uv pip install "numpy==1.26.4" bfcl-eval datasets pandas tqdm huggingface_hub evaluate
#
# evaluation-bfcl = [
# "datasets>=2.14.0",
# "huggingface_hub>=0.20.0,<1.0.0",
# "evaluate>=0.4.0,<1.0.0",
# "pandas>=2.0.0,<3.0.0",
# "tqdm>=4.65.0,<5.0.0",
# "bfcl-eval", # BFCL官方评估工具(强制numpy==1.26.4)
# ]
# RL训练系统依赖(第11章)
rl = [
"trl>=0.24.0", # Transformer Reinforcement Learning
"transformers>=4.20.0", # Transformer模型
"torch>=2.0.0", # PyTorch
"datasets>=2.14.0", # 数据集加载(兼容trl)
"accelerate>=0.20.0", # 分布式训练加速
"peft>=0.5.0", # LoRA等参数高效微调
"bitsandbytes>=0.41.0", # 量化支持
"wandb>=0.15.0", # 训练监控(可选)
"tensorboard>=2.13.0", # TensorBoard支持(可选)
]
# 完整记忆和RAG功能
memory-rag = [
"hello-agents[memory,rag]",
]
# 全部功能(不含evaluation-bfcl,因其与numpy>=2.0冲突)
all = [
"hello-agents[search,memory-rag,protocols,evaluation,rl]",
]
[project.urls]
Homepage = "https://github.com/jjyaoao/HelloAgents"
Documentation = "https://github.com/jjyaoao/HelloAgents/blob/main/README.md"
Repository = "https://github.com/jjyaoao/HelloAgents"
"Bug Tracker" = "https://github.com/jjyaoao/HelloAgents/issues"
[tool.setuptools.packages.find]
where = ["."]
include = ["hello_agents*"]
exclude = ["tests*", "examples*", "docs*"]
[tool.setuptools.package-data]
hello_agents = ["py.typed"]
[tool.black]
line-length = 88
target-version = ['py310']
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| build
| dist
)/
'''
[tool.isort]
profile = "black"
multi_line_output = 3
line_length = 88
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = "-v --tb=short"
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true