NEW releases!!! Ver1.12345
V1.12345: I optimize the language translation for Chinese. I also adapt the prompt to send a code block when you ask the bot to write a code. Please watch the examples in the readme and get the latest version in the releases.
https://github.com/Xeloan/A-discord-bot-based-on-Open-Ai
BUG FIXED IN THE ver1.1234↓↓↓, please update the program. For details view my GitHub https://github.com/Xeloan/A-discord-bot-based-on-Open-Ai
!!!!!!!!!!!!
Hello, long time no see. Major updates! View in
https://github.com/Xeloan/A-discord-bot-based-on-Open-Ai
I 'm always ready to receive suggestions.
V1.1234: This is a major update. First, the stability has been improved a lot. I use windows bat file(now is converted to an exe file Xia Client.exe) to start Xia_Client.js, and when any error appears that causes the program to break down, it will restart automatically instead of just breaking down(You can also restart it by typing /restart). So feel free to let the bot run in your computer and leave it open at home when going out. Next, I add a "/save" command. This will save current prompt into the promptbuffer.pro and type "/restore" to restore the prompt to that one if you have mistyped something. The prompt will also be saved into the prompt_history folder for you to check. If you just turn off the bot or restart it, the prompt is also stored in the prompt.pro so the prompt will be recovered automatically when the bot is restarted. Then I add a "/test" command to test whether the api works alright. The bot will automatically check when started. Finally, I add a language set command. In most conditions, when expressing the same meaning, languages like Chinese and Japanese will much more tokens than English (sometimes more than 2x) so when the prompt becomes longer, the tokens consumed is very considerable. As a result, I come up with an idea. When I type something like “你好”(Chinese). The bot will first use the API to translate the sentence into “hello” and add it to the prompt and then generate the response. After that, the bot then translate the response into Chinese and send it to you. There are two commands. “/lang 0” means English mode, also the common mode (you can chat with the bot in other languages but as shown before, you may spend lot’s of tokens). “/lang 1”means Chinese mode. You can chat in Chinese at lower costs. (More languages will be added in the next version.)
Old messages ↓↓↓
Hello, long time no see. First sorry for the delay of tge recent updates beacuse I've just been infeced by COV-19 and had a really band fever but now I've just narrowly recovered from it and made some improvements to the bot (V1.00012). You can see the example pictures in the readme in my github.
https://github.com/Xeloan/A-discord-bot-based-on-Open-Ai/releases/tag/V1.00012
These are features of recent updates:
V1.00012: New small functions and performance improvement. I add a log function to it which can automatically write current chat history with the bot in to a log file named by the current UTC time in the logs folder(new command: /log which let the bot send you the current log). I also make the bot delete the "Creating" after sending the image. (That seems better) Finally, the bot now will ignore messages sent too quickly in order not to get banned by open AI.(Open ai api will report error if I send another request before it answer my previous request.)
V1.00001: A very small update. I add a channel verification to make the bot only work in one certain channel. (I haven't thought of a way to use just one bot in multiple channels) What's more, I improve the /D image generation to make an image cache in the DALLE_img folder and send the image itself instead of just a url, which will expire in hours.
Old messages↓↓↓
Hello everyone, I have made some improvements to the bot and updated the tutorial: https://github.com/Xeloan/A-discord-bot-based-on-Open-Ai/releases
Old deleted messages↓↓↓
This is a multifunctional discord bot based on Open Ai - GitHub - Xeloan/A-discord-bot-based-on-Open-Ai: This is a multifunctional discord bot based on Open Ai
New small functions and performance improvement. I add a log function to it which can automatically write current chat history with the bot in to a log file named by the current UTC time in the log...