Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,7 @@ htmlcov/
.tox/
.nox/
.hypothesis/
.coverage.*
.coverage.*

#venv虚拟环境
.venv/
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
38 changes: 22 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@

[![Python Version](https://img.shields.io/badge/python-3.8%2B-blue)](https://www.python.org/) [![LLM Powered](https://img.shields.io/badge/LLM-powered-FF6F61)](https://platform.openai.com/)

专为闲鱼平台打造的AI值守解决方案,实现闲鱼平台7×24小时自动化值守,支持多专家协同决策、智能议价和上下文感知对话。

专为闲鱼平台打造的AI值守解决方案,实现闲鱼平台7×24小时自动化值守,支持多专家协同决策、智能议价和上下文感知对话。

## 🌟 核心特性

### 智能对话引擎

| 功能模块 | 技术实现 | 关键特性 |
| ---------- | ------------------- | ------------------------------------------------------------ |
| 上下文感知 | 会话历史存储 | 轻量级对话记忆管理,完整对话历史作为LLM上下文输入 |
| 专家路由 | LLM prompt+规则路由 | 基于提示工程的意图识别 → 专家Agent动态分发,支持议价/技术/客服多场景切换 |

### 业务功能矩阵

| 模块 | 已实现 | 规划中 |
| -------- | ----------------------------- | ---------------------------- |
| 核心引擎 | ✅ LLM自动回复<br>✅ 上下文管理 | 🔄 情感分析增强 |
Expand All @@ -22,45 +23,47 @@
| 运维监控 | ✅ 基础日志 | 🔄 钉钉集成<br>🔄 Web管理界面 |

## 🎨效果图

<div align="center">
<img src="./images/demo1.png" width="600" alt="客服">
<br>
<em>图1: 客服随叫随到</em>
</div>


<div align="center">
<img src="./images/demo2.png" width="600" alt="议价专家">
<br>
<em>图2: 阶梯式议价</em>
</div>

<div align="center">
<img src="./images/demo3.png" width="600" alt="技术专家">
<img src="./images/demo3.png" width="600" alt="技术专家">
<br>
<em>图3: 技术专家上场</em>
</div>

<div align="center">
<img src="./images/log.png" width="600" alt="后台log">
<img src="./images/log.png" width="600" alt="后台log">
<br>
<em>图4: 后台log</em>
</div>


## 🚴 快速开始

### 环境要求

- Python 3.8+
- 安装有uv

### 安装步骤

```bash
1. 克隆仓库
git clone https://github.com/shaxiu/XianyuAutoAgent.git
cd XianyuAutoAgent

2. 安装依赖
pip install -r requirements.txt
uv sync

3. 配置环境变量
创建一个 `.env` 文件,包含以下内容,也可直接重命名 `.env.example` :
Expand All @@ -82,8 +85,9 @@ COOKIES_STR自行在闲鱼网页端获取cookies(网页端F12打开控制台,
### 使用方法

运行主程序:

```bash
python main.py
uv run main.py
```

### 自定义提示词
Expand All @@ -99,8 +103,6 @@ python main.py

欢迎通过 Issue 提交建议或 PR 贡献代码,请遵循 [贡献指南](https://contributing.md/)



## 🛡 注意事项

⚠️ 注意:**本项目仅供学习与交流,如有侵权联系作者删除。**
Expand All @@ -110,12 +112,14 @@ python main.py
如需学习交流,请联系:[[email protected]](https://mailto:[email protected]/)

## 🧸特别鸣谢

本项目参考了以下开源项目:
https://github.com/cv-cat/XianYuApis
<https://github.com/cv-cat/XianYuApis>

感谢<a href="https://github.com/cv-cat">@CVcat</a>的技术支持

## 📱 交流群

欢迎加入项目交流群,交流技术、分享经验、互助学习。
<div align="center">
<table>
Expand All @@ -133,30 +137,32 @@ https://github.com/cv-cat/XianYuApis
## 💼 寻找机会

### <a href="https://github.com/shaxiu">@Shaxiu</a>

**🔍寻求方向**:**AI产品经理实习**
**🛠️项目贡献:**:需求分析、agent方案设计与实现
**📫 联系:** **email**:[email protected];**wx:** coderxiu

### <a href="https://github.com/cv-cat">@CVcat</a>

**🔍寻求方向**:**研发工程师实习**(python、java、逆向、爬虫)
**🛠️项目贡献:**:闲鱼逆向工程
**📫 联系:** **email:** [email protected];**wx:** CVZC15751076989
**📫 联系:** **email:** <[email protected]>;**wx:** CVZC15751076989

## ☕ 请喝咖啡

您的☕和⭐将助力项目持续更新:

<div align="center">
<img src="./images/wechat_pay.jpg" width="400px" alt="微信赞赏码">
<img src="./images/wechat_pay.jpg" width="400px" alt="微信赞赏码">
<img src="./images/alipay.jpg" width="400px" alt="支付宝收款码">
</div>


## 📈 Star 趋势

<a href="https://www.star-history.com/#shaxiu/XianyuAutoAgent&Date">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=shaxiu/XianyuAutoAgent&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=shaxiu/XianyuAutoAgent&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=shaxiu/XianyuAutoAgent&type=Date" />
</picture>
</a>


13 changes: 13 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[project]
name = "xianyuautoagent"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"loguru==0.7.3",
"openai==1.65.5",
"python-dotenv==1.0.1",
"requests==2.32.3",
"websockets==13.1",
]
Loading