Skip to content

lvchiyang/Agent-with-wechat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Agent项目

项目架构

1. 后端架构

  • 大模型接口层:将云端大模型功能解耦,支持多个模型切换

    • 位置:backend/LLM/下的不同文件夹
    • 统一LLM API接口供Agent调用
    • 当前支持:阿里通义千问,可扩展其他模型
  • Agent主进程:backend/Agent

    • 监听9001端口
    • 处理前端WebSocket连接
    • 调用LLM并返回结果
    • 集成角色管理、情感分析、记忆管理等模块
  • 核心模块

    • 角色管理:管理Agent人设 (Agent-with-wechat\backend\config\persona_config.yaml)
    • 记忆管理:维护对话历史 (backend/modules/memory_manager.py)

2. 前端架构

  • 简单的对话界面
  • WebSocket实时通信
  • 位置:frontend/index.html

快速开始

1. 配置

编辑 Agent-with-wechat\backend\config: yaml llm: active: ali_qwen # 选择使用的模型 params: ali_qwen: api_key: "your_api_key"

2. 启动服务

bash python Agent_hall.py

3. 访问前端

打开 frontend/index.html

后续规划

  1. 完善角色系统
  2. 添加情感分析
  3. 实现长期记忆
  4. 支持多模态交互

项目结构

Agent-with-wechat/ backend/ # 后端代码 -Agent/ # Agent主程序 -config/ # 配置文件 frontend/ # 前端代码 Agent_hall.py 主程序入口 requirements.txt # 依赖列表

依赖安装

在启动项目前,请确保已安装所有依赖

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published