Giter VIP home page Giter VIP logo

chatlyt_wechatbot's Introduction

ChatLYT😅

一个用于微信自动回复的ai机器人

注意

使用时间过长微信可能会强制退出!

介绍

这是一个用于个人微信的ai自动回复程序, 无需网页版微信即可使用。

更新说明

2024-5-16

  1. 修复读取不含文字的历史记录后报错
  2. 优化回答生成时的消息接收

2024-5-15

  1. 修复bug
  2. 新增生成图片功能
  3. 新增保存对话记录

2024-5-14

  1. 新增链接和表情识别
  2. 新增支持接收语音消息

2024-5-13

  1. 优化代码逻辑
  2. 优化连续信息读取
  3. 优化拟人模式效果
  4. 优化快速对话中的消息读取
  5. 系统提示中增加时间天气等环境信息
  6. 新增启动时读取历史对话记录

2024-5-12

  1. 优化代码逻辑
  2. 新增回复多人功能
  3. 新增拟人模式,增强拟真程度

2024-5-11

  1. 修复bug
  2. 新增图片信息回复功能

2024-5-10

  1. 文字信息回复

环境配置

通过配置文件安装

# Create conda environment
conda create -n chatlyt python=3.9

# Activate the environment
conda activate chatlyt

# Install packages
pip install -r requirements.yml

使用说明

准备用户信息

用微信截图工具(Alt+A)获取下面这些图片并保存在相应文件夹下(如下所示): 列表中朋友的头像,聊天框中双方的头像,发送按键,复制按键,添加到表情按键(最后两个是右键消息内容后弹出)。其余所需文件:在role.txt中写入希望ai扮演的角色。people.json中存放好友列表,用于同时回复多人消息。

object
|___friend1  # folder
|   |___large_avator.png # avator in the message list
|   |___avator # avator in chat window
|   |___role.txt # system prompt
|   
|___friend2 # folder
|
|___audio.png # audio to text button
| 
|___duplicate.png # duplicate button
|
|___meme.png # add meme button
|
|___myavatar.png # your own avatar
|
|___people.json # list of friends
|
|___send.png # send button
|
...

文件夹中的样例为16:9,2k显示器下的图片大小,可能无法适用于所有用户,为保证顺利运行请重新截图。

运行程序

在终端中输入以下代码开始运行; 为保证程序正常运行,请务必将微信窗口置于上层。 推荐将微信窗口长度拉到最大。

单人模式

python -u main.py --person object/friend1

多人模式(建议5人以下)

python -u main.py --people object/people.json

拟人模式

python -u main.py --authentic 2

注意单人模式和多人模式不能混合使用, 拟人模式中authentic可以从0,1,2中进行选择,数字越大越像真人。

更换api

默认的api是huggingface提供的qwen-110B, 如有需要可自行更改。

对话记录

ai启动后会自动将对话记录保存在默认文件夹history中,可在utils.save_history函数中更改保存目录。

声明

本项目仅供技术研究,请勿用于任何商业用途,请勿用于非法用途,如有任何人凭此做何非法事情,均于作者无关,特此声明。

chatlyt_wechatbot's People

Contributors

lee612-1 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.