Skip to content

Chat with ChatGPT (gpt-3.5 or newer),WeChat hook interface based

Notifications You must be signed in to change notification settings

wangxing7714436/ChatGPT-weBot

 
 

Repository files navigation

ChatGPT-weBot

[TOC]

GitHub tag (latest by date)

Using ChatGPT-weBot based on ChatGPT(API key call), Stable Diffusion AI drawing and official WeChat hook interface. 中文文档 | English

Author

Snapdragon Lee (github.com)

cover created from DALL·E2 (openai.com)

Support & Features

  • Support conversation
  • Support context-aware question answering
  • Support multithreaded Stable Diffusion AI drawing (English Only, Support (Negative) Prompt)
  • Never get banned by using official WeChat execution
  • Support API calls for gpt-3.5-turbo and newer models
  • Support WebChatGPT function
  • Support bot's character setting
  • Set the keywords to wake up the WeChat robot in private
  • Set the keywords to wake up the WeChat robot in the group
  • Support replying at-message when mentioning your bot in the group (have bugs)
  • Get help doc inline
  • Regenerate conversation
  • Rollback conversation
  • Conclusion (save token consumption)
  • Reset the whole conversation
  • Support multithreaded conversation in one account
  • No need to manually reboot service after error exists
  • Other

Default configs (Follow steps before you start server)

---> Configurable options detailed guide

Step to Start

  1. Environment: Windows 7+, python 3.7+

  2. Install all packages listed in requirements.txt , use the command like:

    pip install -r ./requirements.txt
    
  3. Download package from Github Releases.

  4. Install WeChat-3.6.0.18.exe on your computer, if your version is higher than 3.6.0.18, you can downgrade instantly. Then get your account online. You can also download zip version of WeChat. If you wanna dual-call WeChat, modify ./dual-start.bat file guiding by annotation.

  5. Monitoring WeChat message by running a server. Here are two methods to achieve this, please choose 1 method :

    • Using injector named DLLinjector_V1.0.3.exe, then choose file named 3.6.0.18-0.0.0.008.dll to inject.

      image-20230221044543472

    • Running funtool_3.6.0.18-1.0.0013.exe , and press Start .

      image-20230221044609319

  6. The last step is fill json files listed in .config/ .

    • In api_config.json, you need to fill in your own parameter settings for API calls. If you don’t know the specific parameters, you only need to fill in the "api_key" and optional "proxy" items.

    • In server_config.json, you can customize the listening address and port. If you don’t know it exactly, no modification needed by default.

    • In config.json , you need to configure your custom options based on your preferences.

    • In sys_character.json, you can customize the character the bot needs to play, and use the command to activate when chatting.

    • (Temporary deprecated) In rev_config.json , you need to fill your ChatGPT login information by choosing 1 method:

      • Email/Password (Not supported for Google/Microsoft accounts)

      • session_token (supported for Google/Microsoft accounts)

        1. Go to chat.openai.com/chat and log in or sign up.
        2. Press F12 to open dev tools.
        3. Copy cookies as __Secure-next-auth.session-token .
  7. Run main.py by using command:

    python main.py
    

    Everything is ready, feel free to go online with your ChatGPT-weBot !

    No limitation, but since switching to OpenAI API, there are usage counts and payment requirements.

Q&A

  1. How to get all response? You can say "continue" in your language.

  2. Have problems? Feel free to create an issue.

  3. How to trace problems in multithreaded program? Print or using debug with information of thread-stack.

  4. Have any preview images related to functionality? Yes, go to -> Preview

  5. Wanna buy me coffee? Thank you, please don't spend too much money.

    image-20230321150123666

Who has starred

Stargazers repo roster for @SnapdragonLee/ChatGPT-weBot

Stargazers over time

Stargazers over time

Log

  • 2023.3.24 Exception handler updates and other pull requests from rogue-shadowdancer and wbbeyourself
  • 2023.3.23 Fix bugs for Stable Diffusion and others, released v1.01 version
  • 2023.3.21 Add plenty of new features, fixed bugs, released v1.00 version
  • 2023.3.4 Add Stable Diffusion into function (English Only)
  • 2023.3.3 Add multithread and rewrite the whole program structure
  • 2023.2.27 Add zip version of WeChat and dual-start.bat, fix the bug that prevents other operations when the response keyword is empty
  • 2023.2.25 Add the option in config.json to quote the original question before answering
  • 2023.2.25 Complete all API function on features and Debugs for errors
  • 2023.2.23 Accomplish some API listed on features
  • 2023.2.23 Fix streaming issue when connecting to reverse server
  • 2023.2.21 Report issue on ChatGPT API
  • 2023.2.20 v0.90-dev released, for basic ChatGPT API usage on WeChat
  • 2023.2.17 Start to develop the whole process
Reference

About

Chat with ChatGPT (gpt-3.5 or newer),WeChat hook interface based

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.2%
  • Batchfile 0.8%