init
This commit is contained in:
@@ -35,8 +35,7 @@ more_dots/
|
||||
├── config/ # 配置层
|
||||
│ └── settings.py # 配置读取
|
||||
│ └── prompts.yaml # 提示词配置
|
||||
│ └── ragflow_templates/ # RAGFlow 模板(表名 -> 模板列表)
|
||||
│ └── table_metadata_prompts/ # 表模型元数据提示词
|
||||
│ └── table_retrieval_prompts/ # 表名检索提示词(表名 -> 模板列表)
|
||||
├── tools/ # 工具模块
|
||||
│ ├── calculator.py # 计算器工具
|
||||
│ └── web_search.py # 网络搜索工具(占位符)
|
||||
@@ -148,14 +147,21 @@ heartbeat_interval = 5
|
||||
|
||||
### RAGFlow 模板同步
|
||||
|
||||
模板文件位于 `config/ragflow_templates`,每个 JSON 对应一个表名与模板列表。
|
||||
模板文件位于 `config/table_retrieval_prompts/tables.json`,单文件包含多个表名与模板列表。
|
||||
同步脚本:
|
||||
|
||||
```bash
|
||||
python scripts/sync_ragflow_templates.py
|
||||
```
|
||||
|
||||
请在 `config/config.ini` 中配置 `ragflow.upload` 上传接口。
|
||||
请在 `config/config.ini` 中配置 `ragflow.upload` 上传接口,并分别设置:
|
||||
`table_retrieval_dataset_id` 与 `sql_gen_dataset_id`。
|
||||
|
||||
默认使用覆盖更新模式(`ragflow.upload_mode = overwrite`)。
|
||||
|
||||
热更新接口:
|
||||
- `POST /api/ragflow/table-retrieval/reload`
|
||||
- `POST /api/ragflow/sql-gen/reload`
|
||||
|
||||
# 使用对话工作流
|
||||
result = manager.execute_workflow(
|
||||
@@ -191,7 +197,7 @@ class CustomTool(BaseTool):
|
||||
创建新的代理类型:
|
||||
|
||||
```python
|
||||
from agents.base_agent import BaseAgent
|
||||
from agent.graph import BaseAgent
|
||||
|
||||
class CustomAgent(BaseAgent):
|
||||
def _build_graph(self):
|
||||
@@ -215,7 +221,7 @@ class CustomAgent(BaseAgent):
|
||||
### 添加新功能
|
||||
|
||||
1. **新工具**: 在 `tools/` 目录下创建新的工具类
|
||||
2. **新代理**: 在 `agents/` 目录下继承 `BaseAgent` 类
|
||||
2. **新代理**: 在 `agent/` 目录下继承 `BaseAgent` 类
|
||||
3. **新工作流**: 在 `workflows/` 目录下扩展工作流管理器
|
||||
|
||||
### 测试
|
||||
|
||||
Reference in New Issue
Block a user