智能AI客服,自动识别客户意图,进行自动回复

Y 62d3638d80 rm weights file 3 ヶ月 前
config 0a0c1bcf59 create init 3 ヶ月 前
database 0a0c1bcf59 create init 3 ヶ月 前
module 0a0c1bcf59 create init 3 ヶ月 前
size_table 0a0c1bcf59 create init 3 ヶ月 前
test_case 0a0c1bcf59 create init 3 ヶ月 前
test_result 0a0c1bcf59 create init 3 ヶ月 前
utils 0a0c1bcf59 create init 3 ヶ月 前
Dockerfile 0a0c1bcf59 create init 3 ヶ月 前
README.MD 0a0c1bcf59 create init 3 ヶ月 前
api_call.py 0a0c1bcf59 create init 3 ヶ月 前
app.py 0a0c1bcf59 create init 3 ヶ月 前
auto_test.py 0a0c1bcf59 create init 3 ヶ月 前
docker-compose.yml 0a0c1bcf59 create init 3 ヶ月 前
ds_r1.py 0a0c1bcf59 create init 3 ヶ月 前
gunicorn_config.py 0a0c1bcf59 create init 3 ヶ月 前
online_run.py 0a0c1bcf59 create init 3 ヶ月 前
qa.txt 0a0c1bcf59 create init 3 ヶ月 前
requirements.txt 0a0c1bcf59 create init 3 ヶ月 前

README.MD

AI问答系统

这是一个基于LangChain和向量数据库的智能问答系统,支持多种LLM模型接入,具有知识库检索和对话记忆功能。

功能特点

  • 支持多种LLM模型接入(豆包、DeepSeek等)
  • 基于向量数据库的知识库检索
  • 对话记忆功能
  • 意图识别和分类
  • RESTful API接口

环境要求

  • Python 3.8+
  • CUDA支持(用于FAISS-GPU)
  • 虚拟环境:tool

安装部署

  1. 克隆项目并安装依赖:

    git clone [项目地址]
    cd [项目目录]
    pip install -r requirements.txt
    
    1. 配置环境变量: 创建.env文件并配置以下参数: ```

LLM_API_KEY=your_api_key LLM_BASE_URL=your_base_url


3. 运行服务:
```bash
# 开发环境运行
python app.py

# 生产环境部署(使用Gunicorn)
gunicorn -w 1 -b 0.0.0.0:1111 app:app

# 使用配置文件部署
gunicorn -c gunicorn_config.py app:app

模型配置

豆包模型

{
    "llm_model_name": "ep-20241018084532-cgm84",
    "llm_api_key": "your_api_key",
    "llm_base_url": "https://ark.cn-beijing.volces.com/api/v3"
}

DeepSeek模型

{
    "llm_model_name": "deepseek-r1-250120",
    "llm_api_key": "your_api_key",
    "llm_base_url": "https://ark.cn-beijing.volces.com/api/v3"
}

项目结构

├── app.py                 # 主应用入口
├── config/               # 配置文件目录
├── database/            # 数据库相关
├── module/              # 核心模块
├── models/              # 模型文件
├── test_case/           # 测试用例
├── utils/               # 工具函数
├── vectordb/            # 向量数据库
├── logs/                # 日志文件
└── test_result/         # 测试结果

开发计划

  • 知识库向量持久化
  • 意图分类系统
  • 对话记忆模块
  • 检察官机器人
  • 完善知识库文件读取方法

注意事项

  1. 确保环境变量正确配置
  2. 知识库文件需要提前处理并导入
  3. 建议使用GPU环境运行以提高性能
  4. 定期备份向量数据库