Files
auto_agent/README.md
T
2026-06-22 15:16:51 +08:00

66 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Agent Web Chat
基于 LangGraph 的多模态对话 Agent,支持文本、图片、音频、多种类型文件输入,具备屏幕截图、浏览器控制、RAG 知识库、数据库查询、本地文件获取等工具调用能力。
## 快速开始
### 1. 克隆仓库并进入项目目录
```bash
git clone <your-repo-url>
cd Agent
Windows:
bash
python -m venv myenv
.\myenv\Scripts\activate
macOS / Linux:
bash
python -m venv myenv
source myenv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
gedit .env
必须填写的变量:
LLM_BASE_URL – 大模型 API 基础地址
LLM_API_KEY – API 密钥
LLM_MODEL – 模型名称(如 Qwen/Qwen2.5-72B-Instruct)
TTS_BASE_URL – 文本转语音服务地址(可选,若不使用音频回复可不填)
ASR_BASE_URL – 语音识别服务地址(可选)
RAG_BASE_URL – RAG 嵌入与重排序服务地址(可选)
# 启动 Web 对话服务(推荐)
# 确保在 Agent 目录下,且 PYTHONPATH 包含 src 目录
cd ./Agent
export PYTHONPATH=src:$PYTHONPATH # Linux/macOS
# 或 Windows PowerShell: $env:PYTHONPATH="src;$env:PYTHONPATH"
uvicorn web.server:app --host 0.0.0.0 --port 8765
# (可选)通过 Cloudflare Tunnel 暴露公网
cloudflared tunnel --url http://localhost:8765
# 进入项目目录并提交代码(Windows 下路径为 .\Agent\)
✅ 推送到公司
powershell
# 进入项目目录
cd Agent
# 暂存所有修改
git add .
# 提交修改(请替换双引号里的内容为实际说明)
git commit -m "修改内容的说明"
# 默认推送到公司
git push
🌐 推送到个人 GitHub
powershell
# 进入项目目录
cd Agent
# 暂存所有修改
git add .
# 提交修改(请替换双引号里的内容为实际说明)
git commit -m "修改内容的说明"
# 显式指定推送到个人仓库 (minor)
git push minor master