Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Gyronee/chatgpt-bizwechat-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 

Repository files navigation

ChatGPT BizWechat Bot

A BizWechat Bot that integrates with OpenAI's ChatGPT to provide answers. Ready to use with minimal configuration required. Based on acheong08/ChatGPT and terry3041/pyChatGPT

基于 acheong08/ChatGPTterry3041/pyChatGPT 开发的企业微信聊天机器人

Screeeshots

Features

  • Reply to specific messages / 回复用户信息
  • Can reset conversation thread with the /reset command / 发送 /reset 来重置对话
  • Multi-chat support. Every user has their own chat session / 每个用户有自己独立的对话

ToDo Features

  • Destroy chatbot after setting expire time to save resources / 会话过期机制, 节省资源

Prerequisites

  • Python 3
  • A BizWechat Coporation Account / 企业微信企业账号
  • Knowledge of how to deploy a self host bot in bizwechat / 了解如何搭建企业微信机器人 (如何获取 Token, EncodingAESKey, CorpID, SECRET, agent_id 等参数)
  • An OpenAI account / OpenAI 账号

Getting started

Install with Docker

docker run -d --name wx-chatbot -p 8868:8868 -v <YOUR PATH TO CONFIG FILE>:/wx-chatbot/config.yaml gyronee/chatgpt-bizwechat-bot:latest

the bot url is http(s)://host:port/chat

Install from source

  1. Clone the repository and navigate to the project directory:
git clone https://github.com/Gyronee/chatgpt-bizwechat-bot.git
cd chatgpt-bizwechat-bot
  1. Install dependencies
cd src && pip install -r requirements.txt
  1. Configuration File create config.yaml under src folder, it has two section, one for BizWechatBot, one for ChatGPT
wx-bot:
  Token: 
  EncodingAESKey: 
  CorpID: 
  SECRET: 
  agent_id: 
// session_token or email/password, choose one  token 和 账户密码二选一即可
chatgpt: 
  session_token: "<__Secure-next-auth.session-token>"
  email: "<YOUR_EMAIL>",
  password: "<YOUR_PASSWORD>"
  1. Launch Application
python main.py
  1. Enjoy

the bot url is http(s)://host:port/chat

Credits

Disclaimer

This is a personal project and is not affiliated with OpenAI in any way.

Changlog

About

ChatGPT BizWechat Bot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published