fix: 去掉所有元宝/yuanbao残留,全面改为 DeepSeek
This commit is contained in:
@@ -1,28 +1,39 @@
|
|||||||
# 元宝全自动代理
|
# DeepSeek Agent Web 控制台
|
||||||
|
|
||||||
## 安装(conda 版本)
|
通过 Playwright 控制 DeepSeek 网页版,实现本地命令自动执行的 AI Agent。
|
||||||
|
|
||||||
|
## 安装
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 创建 conda 环境
|
# 创建 conda 环境
|
||||||
conda create -n yuanbao-agent python=3.12 -y
|
conda create -n deepseek-agent python=3.12 -y
|
||||||
|
|
||||||
# 激活环境
|
# 激活环境
|
||||||
conda activate yuanbao-agent
|
conda activate deepseek-agent
|
||||||
|
|
||||||
# 安装 playwright(包含浏览器)
|
# 安装依赖
|
||||||
pip install playwright
|
pip install playwright flask flask-socketio
|
||||||
python -m playwright install chrome
|
python -m playwright install chrome
|
||||||
```
|
```
|
||||||
|
|
||||||
## 运行
|
## 运行
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 确保在 yuanbao-agent 环境中
|
# 启动 Web 控制台(推荐)
|
||||||
conda activate yuanbao-agent
|
python web_server.py
|
||||||
|
|
||||||
# 运行 MVP v1(显式指令)
|
|
||||||
python yuanbao_agent_mvp.py
|
|
||||||
|
|
||||||
# 运行 v2 智能版(推荐)
|
|
||||||
python yuanbao_agent_v2.py
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
启动后访问 http://localhost:5000
|
||||||
|
|
||||||
|
## 使用流程
|
||||||
|
|
||||||
|
1. 打开 http://localhost:5000
|
||||||
|
2. 点击「启动浏览器」按钮
|
||||||
|
3. 在弹出的 Chrome 窗口中登录 DeepSeek
|
||||||
|
4. 登录完成后返回 Web 界面输入任务
|
||||||
|
|
||||||
|
## 项目结构
|
||||||
|
|
||||||
|
- `yuanbao_agent_chat.py` - Agent 核心,Playwright 控制 DeepSeek + 本地命令执行
|
||||||
|
- `web_server.py` - Flask Web 控制台,SocketIO 实时通信
|
||||||
|
- `detect_generating.py` - 调试工具,探测页面生成状态
|
||||||
|
|||||||
+5
-5
@@ -14,11 +14,11 @@ from datetime import datetime
|
|||||||
from flask import Flask, render_template_string
|
from flask import Flask, render_template_string
|
||||||
from flask_socketio import SocketIO, emit
|
from flask_socketio import SocketIO, emit
|
||||||
|
|
||||||
# 导入 yuanbao_agent_chat 的核心类
|
# 导入 DeepSeek Agent 的核心类
|
||||||
from yuanbao_agent_chat import SoloAgent, ExecutionEngine
|
from yuanbao_agent_chat import SoloAgent, ExecutionEngine
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.config['SECRET_KEY'] = 'yuanbao-agent-secret'
|
app.config['SECRET_KEY'] = 'deepseek-agent-secret'
|
||||||
socketio = SocketIO(app, cors_allowed_origins="*", async_mode='threading')
|
socketio = SocketIO(app, cors_allowed_origins="*", async_mode='threading')
|
||||||
|
|
||||||
# 全局状态
|
# 全局状态
|
||||||
@@ -33,7 +33,7 @@ HTML_TEMPLATE = '''
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Yuanbao Agent - Web 控制台</title>
|
<title>DeepSeek Agent - Web 控制台</title>
|
||||||
<script src="https://cdn.socket.io/4.5.4/socket.io.min.js"></script>
|
<script src="https://cdn.socket.io/4.5.4/socket.io.min.js"></script>
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
@@ -366,7 +366,7 @@ HTML_TEMPLATE = '''
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<h1>🤖 Yuanbao Agent Web 控制台</h1>
|
<h1>🤖 DeepSeek Agent Web 控制台</h1>
|
||||||
<div class="status-bar">
|
<div class="status-bar">
|
||||||
<div class="status">
|
<div class="status">
|
||||||
<span class="status-dot" id="browserStatusDot"></span>
|
<span class="status-dot" id="browserStatusDot"></span>
|
||||||
@@ -856,7 +856,7 @@ def handle_clear_terminal():
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
print("=" * 60)
|
print("=" * 60)
|
||||||
print("Yuanbao Agent Web 控制台")
|
print("DeepSeek Agent Web 控制台")
|
||||||
print("=" * 60)
|
print("=" * 60)
|
||||||
print(f"请打开浏览器访问: http://localhost:5000")
|
print(f"请打开浏览器访问: http://localhost:5000")
|
||||||
print("=" * 60)
|
print("=" * 60)
|
||||||
|
|||||||
Reference in New Issue
Block a user