#Perfect discord chatbot based on Open AI

96 messages · Page 1 of 1 (latest)

deep chasm
#

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↓↓↓

GitHub

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

GitHub

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...

GitHub

This is a multifunctional discord bot based on Open Ai - Xeloan/A-discord-bot-based-on-Open-Ai

untold torrent
#

Remove /D

#

Let the bot setup a channel for auto chat bot

deep chasm
# untold torrent Remove /D

I think generating a picture is useful so why remove. It can certainly be used in channels as a chatbot. Though compared to the one released just now the function of the bot is too simple…..

untold torrent
#

@deep chasm also bot got errors

#

@deep chasm

deep chasm
#

my bot works alright

#

let me check

deep chasm
deep chasm
#

your open ai api is not right

#

I think if you send common messages it will also be unable to reply you

#

You have to be a paid user of open ai to generate an open ai api key

untold torrent
#

i ll see

pure oracle
deep chasm
untold torrent
#

@deep chasm make it to send a messsage in specified channel and answer inside embed better

#

also it doesnt support image

deep chasm
#

yes davinci isn’t used for reading images

untold torrent
deep chasm
untold torrent
#

oh

#

u re doing well

opaque crown
deep chasm
opaque crown
#

no, something like this

opaque crown
#

"yoy" lmao

deep chasm
deep chasm
deep chasm
deep chasm
calm nebula
#

write about piracy

deep chasm
deep chasm
# opaque crown these slash commands

I'm sorry but could you tell me why it goes wrong: Cannot read properties of undefined (reading 'SlashCommandBuilder')
I have required discord.js

deep chasm
#

I have just updated by trial and error..

#

let me have a rest

#

winter night
#

hi how i can use the Js data i dont get it

#

i open this node.js and then ?

deep chasm
deep chasm
#

replace the 12345 in it

#

test.js is just a copy of Xia Client.js

sturdy mason
#

Hey I am interested on deploying chatgpt on one of my channels in my discord, but I do not have a coding back ground.

#

Question 1: do i need to know coding? Question 2: Is it expensive?

deep chasm
#

but it’s not as hard as you may think

deep chasm
#

I think you can ask chatgpt for help

#

Just paste my code my code into it and as it how does it work, it will explain the principle to you. I think you will soon understand it

deep chasm
#

I use davinci3 the most expensive one. If you keep chatting with the bot constantly for 1 hour, you will spend about 2dollars. (You can see the pricing i the open ai home page)

deep chasm
sturdy mason
#

Question Lets say I begin to pay for it and provide it as a tool in my discord channel. May I be able to token gate the amount of times it is used; by using a token, used by my community to limit the usage?

deep chasm
sturdy mason
#

Ok thank you for your help, I will do further research on this. If I have any more questions I will be sure to come back and ask.

deep chasm
#

Hello, new updates

#

emmm, how to change the attachments in the post?

#

I can't find a button on the computer

#

just paste not work..

green marten
#

HI

deep chasm
severe python
#

I dont understand JS, but how did you get around the bots inability to use its own previous answers/or your previous prompts in its answers? I have just been adding its answers to a list and then add that to the next prompt but this eventually breaks once the token size limit is reached. is there a magic way around this?

deep chasm
deep chasm
# severe python I dont understand JS, but how did you get around the bots inability to use its o...

emmm I think you may also misunderstand the concept of prompt, the prompt is something like this:
The following is a conversation with an AI friend.It's Xeloan's good friend. Its name is Xia. It is talktive,curious , creative, clever, and very friendly.

Human: Hello, who are you?
AI: I am Xeloan's friend Xia. Nice to meet you.
Human: hello let's chat
AI: Sure! What would you like to chat about?
Human: Let's talk about covid-19
AI: Sure! What would you like to know about Covid-19?
Human: How can I do if I'm infected with it?
AI: If you think you may have been infected with Covid-19, it is important to seek medical attention as soon as possible. You should contact your local health department or healthcare provider for guidance on testing and treatment options. It is also important to practice social distancing, wear a face mask when in public, and follow all other safety guidelines set by the CDC.
Human:

deep chasm
deep chasm
#

New updates!!!

#

Welcome to test

deep chasm
#

There may be a hidden bug

#

fixed

#

already

#

🙂

deep chasm
#

I add a command list

deep chasm
#

Bug fixed!!!!

#

Please update your program

deep chasm
#

Optimized for both Chinese and English↑

#

I've just made changes to the prompt of translation

#

It may work better in the translation

deep chasm
#

New releases!!!

#

Ver1.12345

#

V1.12345: I optimize the language translation for Chinese. I also adapt fhe 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!

#
GitHub

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

GitHub

I optimize the language translation for Chinese. I also adapt fhe prompt to send a code block when you ask the bot to write a code. Please watch the examples in the readme.

#

Welcome to test and send me the feedback

#

I'm not very green now in these months, I will keep making progress!💪

untold torrent
#

@deep chasm

#

I want to add this to my server

deep chasm
deep chasm
#

I 've made some improvements to' the code writing