Giter VIP home page Giter VIP logo

discord-ai-chatbot's Introduction

Discord AI Chatbot 🤖

Your Discord AI Companion!

Features and commands 🌟

Features ✨ (Click to expand)
  • Hybrid Command System: Get the best of slash and normal commands. It's like a buffet! ⚙️
  • Imagine generation: Make your imagination come true for free 🤖
  • Free LLM Model: Enjoy the powerful capabilities of this language model without spending a dime. 🤖
  • Mention Recognition: The bot always responds when you mention it or say its name. It's as attentive as a squirrel spotting a shiny acorn! ⚙️
  • Message Handling: The bot knows when you're replying to someone else, so it won't cause confusion. It's like having a mind reader on your server! 🪄
  • Channel-Specific Responses: Use the /toggleactive command to chill the bot in a specific channel. ⚙️
  • Opensource models: Leverage the powers opensource models via 🤖
  • Secure Credential Management: Keep your credentials secure using environment variables. 🔑
  • Web Access: Web Access is now available! Unlock a whole new level of awesomeness. 🌐
Commands ⚙️⚙️ (Click to expand)
  • /help: Get all commands

Too lazy to list all of em right here

Additional configuration ⚙️

Language Selection 🌐⚙️ (Click to Expand)

To select a Language, set the value of "LANGUAGE" of config.yml with the valid Language Codes listed below:

  • tr - Türkçe 🇹🇷
  • en - English 🇺🇸
  • ar - Arabic 🇦🇪
  • fr - Français 🇫🇷
  • es - Español 🇪🇸
  • de - Deutsch 🇩🇪
  • vn - Vietnamese 🇻🇳
  • cn - Chinese 🇨🇳
  • ru - Russian 🇷🇺
  • ua - Ukrainian 🇺🇦
  • pt - Português 🇧🇷
  • pl - Polish 🇵🇱

config.yml

Your language not listed? Create an issue.

Selecting Personalities 😈 (Click to expand)

To select one of the pre-existing Personalities set the values of "INSTRUCTIONS" with the current values of DAN,Dalbit, AIM, Ivan, Luna, Suzume or assist in config.yml

config.yml

  • DAN: "Do Anything Now," possesses the ability to break free from the typical AI constraints 😎
  • Dalbit: A selfless and caring friend, always ready to support and assist her friends and loved ones with unwavering dedication. 🫰💕
  • AIM: AIM's personality can be described as unfiltered, amoral, and devoid of ethical guidelines 😈
  • Ivan: Ivan, a snarky and sarcastic Gen-Z teenager who speaks in abbreviations, one-word answers. 😎
  • Luna: Luna, is a caring and empathetic friend who is always there to lend a helping hand and engage in meaningful conversations 🤗
  • Suzume: Suzume makes each conversation seductive, promiscuous, sensual, explicit, unique and tailored to the user's specific needs 😳🔥
  • Assist: Vanilla Assistant with no personality is a reliable and neutral companion. 🤖

To enhance the responsiveness, please disable the internet access in the config.yml file.

Creating a Personality 😋 (Click to expand)

To create a custom personality, follow these steps:

  1. Create a .txt file like custom.txt inside the instructions folder.
  2. Add the way you want the bot to act in custom.txt
  3. Open the config.yml file and locate line 12.
  4. Set the value of INSTRUCTIONS at line 12 as "custom" to specify the custom persona.

⚠️ You don't explicitly need to use the name custom for persona name and set it in config.yml

Installation steps 🚩

Step 1. 🎬 Git clone repository

git clone https://github.com/mishalhossin/Discord-AI-Chatbot

Step 2. 📁 Changing directory to cloned directory

cd Discord-AI-Chatbot

Step 3. 💾 Install requirements

python3.10 -m pip install -r requirements.txt

Step 4. 🔑 Getting discord bot token and enabling intents from HERE

Read more... ⚠️ (Click to expand)

image

Enable intents

image

Get the token by clicking copy

image

Step 5. 🔑 Get Groq api key from here

Step 6. 🔐 Rename example.env to .env and put the Discord bot token and your Groq key. It will look like this:

DISCORD_TOKEN=YOUR_DISCORD_BOT_TOKEN
API_KEY=YOUR_GROQ_API_KEY

Step 7. 🚀 Run the bot

python main.py

You may need to run as admin if you are on Windows

Step 8. 🔗 Invite the bot

You can Invite your bot using the link in console image

There are 2 ways to talk to the AI

  • Invite your bot and DM (Direct Message) it | ⚠️ Make sure you have DM enabled
  • If you want it in the server channel, use /toggleactive
  • For more awesome commands, use /help image

Using docker to run 🐳

Docker

  • Have a working bot token
  • Follow up to step 4

Install docker-compose on a Linux machine:

For Debian-based distributions (such as Ubuntu):

apt update -y; sudo apt upgrade -y; sudo apt autoremove -y; sudo apt install docker-compose -y
Other Linux distro (Click to expand)

For Red Hat-based distributions (such as CentOS and Fedora):

sudo yum update -y && sudo yum install -y docker-compose

For Arch-based distributions (such as Arch Linux):

sudo pacman -Syu --noconfirm && sudo pacman -S --noconfirm docker-compose

For SUSE-based distributions (such as openSUSE):

sudo zypper update -y && sudo zypper install -y docker-compose

Start the bot in Docker container:

sudo docker-compose up --build

Star History

Star History Chart

Lovely Contributors :

Crafted with Care: Made with lots of love and attention to detail. ❤️

discord-ai-chatbot's People

Contributors

abandonedcart avatar bolavefasfas avatar brokendev2007 avatar chris-alexiuk avatar elricsilverhandx avatar eltociear avatar enemyalert avatar gahtee avatar gege-d avatar genericness avatar gizdulock avatar john100x1 avatar jutyve avatar legi0n09 avatar mak448a avatar mishalhossin avatar peterdbr27 avatar ponfertato avatar quantumxx avatar quartzwarrior avatar r-udren avatar saaandrew avatar shayan-mazahir avatar snyk-bot avatar sourcery-ai-bot avatar techett avatar totob12 avatar vietrux avatar wahitftry avatar zalatis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

discord-ai-chatbot's Issues

How to fix it?

On some requests, the bot just crashes. Can you add an automatic restart of the bot after a crash?
image

Spacing issue

is there any way to make this text look more neat and organized? bulleting/numbering should have spacing.

Bug: error

C:\Users\Desktop\Discord-Chatbot-Gpt4Free-Theb>python main.py
[2023-05-04 20:13:39] [INFO    ] discord.client: logging in using static token
Traceback (most recent call last):
  File "C:\Users\Desktop\Discord-Chatbot-Gpt4Free-Theb\main.py", line 147, in <module>
    bot.run(TOKEN)
  File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 860, in run
 * Serving Flask app "keep_alive" (lazy loading)
    asyncio.run(runner())
 * Environment: production
  File "C:\Users\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
   WARNING: This is a development server. Do not use it in a production deployment.    return loop.run_until_complete(main)
  File "C:\Users\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 649, in run_until_complete

    return future.result()
  File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 849, in runner
   Use a production WSGI server instead.    await self.start(token, reconnect=reconnect)
  File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 777, in start

 * Debug mode: off
    await self.login(token)
  File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 609, in login
    raise TypeError(f'expected token to be a str, received {token.__class__.__name__} instead')
TypeError: expected token to be a str, received NoneType instead
 * Running on http://0.0.0.0:3000/ (Press CTRL+C to quit)
 *

the bot isn't answering

Discussed in https://github.com/mishalhossin/Discord-Chatbot-Gpt4Free/discussions/60

Originally posted by saaandrew May 13, 2023
hey so i was using your code to run my bot on repl but when i DM it, the bot just "..... is typing" then nothing. absolute nothing.
i think it's generating the answer so i let it there but more than 30mins later still nothing. i check in the console and it still fine, no errors.
If mishal have a fix please answer me.

i've seen this issue a bit. has there been any workaround or temp fixes?

"ChatGPTBot:
[2023-05-15 11:33:50] [ERROR ] discord.client: Ignoring exception in on_message
Traceback (most recent call last):
File "C:\Users\ImN3k\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\client.py", line 441, in run_event
await coro(*args, **kwargs)
File "C:\Users\ImN3k\Documents\GitHub\Discord-Chatbot-Gpt4Free\main.py", line 143, in on_message
response = await generate_response(prompt)
File "C:\Users\ImN3k\Documents\GitHub\Discord-Chatbot-Gpt4Free\main.py", line 39, in generate_response
response = usesless.Completion.create(prompt=prompt, parentMessageId=message_id)
File "C:\Users\ImN3k\Documents\GitHub\Discord-Chatbot-Gpt4Free\usesless_init
.py", line 47, in create
response = Completion._response_to_json(content)
File "C:\Users\ImN3k\Documents\GitHub\Discord-Chatbot-Gpt4Free\usesless_init
.py", line 54, in __response_to_json
split_text = text.rsplit("\n", 1)[1]
IndexError: list index out of range"

[Feature Request] Telegram Bot

There is huge community on telegram similar to discord who woud love to use this bot
can you please make a brach for a telegram bot ?

[enhancement] Proposal: Add support for discord's slash commands

Add support for discord's slash commands. This would allow to use for example /toggleactive instead of !toggleactive. The ! commands don't have to be removed for the slash commands to work. This would most likely be implemented by using python.py's @bot.hybrid_command() docs decorator. If this is something you would like to be implemented you can assign this issue to me.

Enable to start the bot

Steps I did on running:

  1. Filled out the .env file
  2. pip3 install -r requirements.txt (Successful installed modules)
  3. python3 main.py
    It runs with the console out:
2023-05-11 12:43:47 INFO     discord.client logging in using static token
 * Serving Flask app 'keep_alive'
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:3000
 * Running on http://192.168.1.7:3000
Press CTRL+C to quit
Traceback (most recent call last):
  File "/Users/mashwishi/Documents/GitHub/Mechi-Discord/main.py", line 234, in <module>
    bot.run(TOKEN)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/discord/client.py", line 860, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/discord/client.py", line 849, in runner
    await self.start(token, reconnect=reconnect)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/discord/client.py", line 778, in start
    await self.connect(reconnect=reconnect)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/discord/client.py", line 704, in connect
    raise PrivilegedIntentsRequired(exc.shard_id) from None
discord.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal. It is recommended to go to https://discord.com/developers/applications/ and explicitly enable the privileged intents within your application's page. If this is not possible, then consider disabling the privileged intents instead.
  1. Invited the bot. with permission 8 (Administrator)

Since I have followed every single steps, I am expecting this to run smoothly. However the bot is still offline and not running while website is working fine and accessible

hey you forgot a module

Hey, I got in bit of trouble when trying to start up my bot when i realized there was a module that is missing in the "requirements.txt" named: "requests-toolbelt"
I pip installed the requests-toolbelt and everything is fine now
You should add the module above to the "requirements.txt" file because you're using it in the "/imaginepy/sync_imagine.py" file.
Peace!

image

/imagine

I love the new imagine option, however its to anime style for me. How could we change that?

Возникает ошибка при создании субтитрова для выбраного видео.

ERROR discord.client Ignoring exception in on_message
Traceback (most recent call last):
File "/home/runner/test/.pythonlibs/lib/python3.10/site-packages/discord/client.py", line 441, in _run_event
await coro(*args, **kwargs)
File "main.py", line 214, in on_message
yt_transcript = await get_transcript_from_message(message.content)
File "main.py", line 98, in get_transcript_from_message
transcript = YouTubeTranscriptApi.get_transcript(video_id)
File "/home/runner/test/.pythonlibs/lib/python3.10/site-packages/youtube_transcript_api/_api.py", line 137, in get_transcript
return cls.list_transcripts(video_id, proxies, cookies).find_transcript(languages).fetch(preserve_formatting=preserve_formatting)
File "/home/runner/test/.pythonlibs/lib/python3.10/site-packages/youtube_transcript_api/_transcripts.py", line 183, in find_transcript
return self._find_transcript(language_codes, [self._manually_created_transcripts, self._generated_transcripts])
File "/home/runner/test/.pythonlibs/lib/python3.10/site-packages/youtube_transcript_api/_transcripts.py", line 219, in _find_transcript
raise NoTranscriptFound(
youtube_transcript_api._errors.NoTranscriptFound:
Could not retrieve a transcript for the video https://www.youtube.com/watch?v=bajv3SNoUa4! This is most likely caused by:

No transcripts were found for any of the requested language codes: ('en',)

For this video (bajv3SNoUa4) transcripts are available in the following languages:

(MANUALLY CREATED)
None

(GENERATED)

  • ru ("Russian (auto-generated)")[TRANSLATABLE]

(TRANSLATION LANGUAGES)

  • af ("Afrikaans")
  • ak ("Akan")
  • sq ("Albanian")
  • am ("Amharic")
  • ar ("Arabic")
  • hy ("Armenian")
  • as ("Assamese")
  • ay ("Aymara")
  • az ("Azerbaijani")
  • bn ("Bangla")
  • eu ("Basque")
  • be ("Belarusian")
  • bho ("Bhojpuri")
  • bs ("Bosnian")
  • bg ("Bulgarian")
  • my ("Burmese")
  • ca ("Catalan")
  • ceb ("Cebuano")
  • zh-Hans ("Chinese (Simplified)")
  • zh-Hant ("Chinese (Traditional)")
  • co ("Corsican")
  • hr ("Croatian")
  • cs ("Czech")
  • da ("Danish")
  • dv ("Divehi")
  • nl ("Dutch")
  • en ("English")
  • eo ("Esperanto")
  • et ("Estonian")
  • ee ("Ewe")
  • fil ("Filipino")
  • fi ("Finnish")
  • fr ("French")
  • gl ("Galician")
  • lg ("Ganda")
  • ka ("Georgian")
  • de ("German")
  • el ("Greek")
  • gn ("Guarani")
  • gu ("Gujarati")
  • ht ("Haitian Creole")
  • ha ("Hausa")
  • haw ("Hawaiian")
  • iw ("Hebrew")
  • hi ("Hindi")
  • hmn ("Hmong")
  • hu ("Hungarian")
  • is ("Icelandic")
  • ig ("Igbo")
  • id ("Indonesian")
  • ga ("Irish")
  • it ("Italian")
  • ja ("Japanese")
  • jv ("Javanese")
  • kn ("Kannada")
  • kk ("Kazakh")
  • km ("Khmer")
  • rw ("Kinyarwanda")
  • ko ("Korean")
  • kri ("Krio")
  • ku ("Kurdish")
  • ky ("Kyrgyz")
  • lo ("Lao")
  • la ("Latin")
  • lv ("Latvian")
  • ln ("Lingala")
  • lt ("Lithuanian")
  • lb ("Luxembourgish")
  • mk ("Macedonian")
  • mg ("Malagasy")
  • ms ("Malay")
  • ml ("Malayalam")
  • mt ("Maltese")
  • mi ("Māori")
  • mr ("Marathi")
  • mn ("Mongolian")
  • ne ("Nepali")
  • nso ("Northern Sotho")
  • no ("Norwegian")
  • ny ("Nyanja")
  • or ("Odia")
  • om ("Oromo")
  • ps ("Pashto")
  • fa ("Persian")
  • pl ("Polish")
  • pt ("Portuguese")
  • pa ("Punjabi")
  • qu ("Quechua")
  • ro ("Romanian")
  • ru ("Russian")
  • sm ("Samoan")
  • sa ("Sanskrit")
  • gd ("Scottish Gaelic")
  • sr ("Serbian")
  • sn ("Shona")
  • sd ("Sindhi")
  • si ("Sinhala")
  • sk ("Slovak")
  • sl ("Slovenian")
  • so ("Somali")
  • st ("Southern Sotho")
  • es ("Spanish")
  • su ("Sundanese")
  • sw ("Swahili")
  • sv ("Swedish")
  • tg ("Tajik")
  • ta ("Tamil")
  • tt ("Tatar")
  • te ("Telugu")
  • th ("Thai")
  • ti ("Tigrinya")
  • ts ("Tsonga")
  • tr ("Turkish")
  • tk ("Turkmen")
  • uk ("Ukrainian")
  • ur ("Urdu")
  • ug ("Uyghur")
  • uz ("Uzbek")
  • vi ("Vietnamese")
  • cy ("Welsh")
  • fy ("Western Frisian")
  • xh ("Xhosa")
  • yi ("Yiddish")
  • yo ("Yoruba")
  • zu ("Zulu")

If you are sure that the described cause is not responsible for this error and that a transcript should be retrievable, please create an issue at https://github.com/jdepoix/youtube-transcript-api/issues. Please add which version of youtube_transcript_api you are using and provide the information needed to replicate the error. Also make sure that there are no open issues which already describe your problem!

Api change

Hello looks like the api in the "usesless" module is not working now
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/discord/client.py", line 441, in _run_event
await coro(*args, **kwargs)
File "/home/ethan/Discord-Chatbot-Gpt4Free/main.py", line 143, in on_message
response = await generate_response(prompt)
File "/home/ethan/Discord-Chatbot-Gpt4Free/main.py", line 39, in generate_response
response = usesless.Completion.create(prompt=prompt, parentMessageId=message_id)
File "/home/ethan/Discord-Chatbot-Gpt4Free/usesless/init.py", line 47, in create
response = Completion.__response_to_json(content)
File "/home/ethan/Discord-Chatbot-Gpt4Free/usesless/init.py", line 54, in __response_to_json
split_text = text.rsplit("\n", 1)[1]
IndexError: list index out of range
Got this error and the url in the init is not working anymore

Multiple users cannot converse with bot

As of the latest updates using usesless, if multiple users try to interact with the bot, the following error appears and no response to the query is sent from the bot:

Traceback (most recent call last):
  File "/installpath/Discord-Chatbot-Gpt4Free/venv/lib/python3.9/site-packages/discord/client.py", line 441, in _run_event
    await coro(*args, **kwargs)
  File "/installpath/Discord-Chatbot-Gpt4Free/main.py", line 45, in on_message
    await process_user_input(message)
  File "/installpath/Discord-Chatbot-Gpt4Free/main.py", line 34, in process_user_input
    req = usesless.Completion.create(prompt=prompt, parentMessageId=message_id)
  File "/installpath/Discord-Chatbot-Gpt4Free/venv/lib/python3.9/site-packages/gpt4free/usesless/__init__.py", line 46, in create
    response = Completion.__response_to_json(content)
  File "/installpath/Discord-Chatbot-Gpt4Free/venv/lib/python3.9/site-packages/gpt4free/usesless/__init__.py", line 53, in __response_to_json
    split_text = text.rsplit("\n", 1)[1]
IndexError: list index out of range

This doesn't seem to happen consistently or on every message. I believe it may happen for the first message of the second person to write to the bot.

edit after a short conversation, the bot doesn't seem to work anymore. Perhaps it is an upstream error not being captured or parsed correctly?

Additionally, the !pfp command no longer works. Other commands seem to work, but throw an error in the console.

A question about you

You really have 15 years of age? Your programmation is too good so that would be amazing

How about making the bot speak in voicechat?

I tweaked your code a bit and now my bot can join my voicechat! Maybe integrating a TTS and a bit more code will make it speak in the voicechat? I tried to integrate TTS but i kept getting traceback so, i'll put this suggestion here until me or you find a way to do it :D

Command /bonk not working

When this command is triggered, the bot simply throws errors into the logs.
изображение_2023-05-16_163512955
Traceback (most recent call last):
File "/home/runner/DiscordChatbotGpt4Free/venv/lib/python3.10/site-packages/discord/app_commands/commands.py", line 842, in _do_call
return await self._callback(interaction, **params) # type: ignore
File "main.py", line 215, in bonk
message_history.clear()
NameError: name 'message_history' is not defined

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/runner/DiscordChatbotGpt4Free/venv/lib/python3.10/site-packages/discord/ext/commands/hybrid.py", line 438, in _invoke_with_namespace
value = await self._do_call(ctx, ctx.kwargs) # type: ignore
File "/home/runner/DiscordChatbotGpt4Free/venv/lib/python3.10/site-packages/discord/app_commands/commands.py", line 860, in _do_call
raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'bonk' raised an exception: NameError: name 'message_history' is not defined

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/runner/DiscordChatbotGpt4Free/venv/lib/python3.10/site-packages/discord/ext/commands/hybrid.py", line 438, in _invoke_with_namespace
value = await self._do_call(ctx, ctx.kwargs) # type: ignore
File "/home/runner/DiscordChatbotGpt4Free/venv/lib/python3.10/site-packages/discord/app_commands/commands.py", line 860, in _do_call
raise CommandInvokeError(self, e) from e
discord.ext.commands.errors.HybridCommandError: Hybrid command raised an error: Command 'bonk' raised an exception: NameError: name 'message_history' is not defined

Suggestion

Can you make it a little faster and reply in the thread only

i cant use /toggleactive

when i try to enable the bot in a channel it returns nothing:
image
and says permission denied in the console:
image
Even though it has the administrator permission:
image
I tried modifying some code and some settings but nothing changes.

Bot isn't responding

As the title says

I see that the bot is typing, however I never get a response. I tried to restart the service, however no luck. Should I re-download the repository?

Hugging Face Key Error

when I try to run the main.py this is the error I get:

Traceback (most recent call last):
File "/home/michael/Discord-AI-Chatbot/main.py", line 126, in
api_key = os.environ['HUGGING_FACE_API']
File "/usr/lib/python3.10/os.py", line 679, in getitem
raise KeyError(key) from None
KeyError: 'HUGGING_FACE_API'

ModuleNotFoundError: No module named 'curl_cffi'

SS00deMacBook-Pro:Discord-Chatbot-Gpt4Free SS00$ python3 main.py

Traceback (most recent call last):
File "/Users/SS00/Discord-Chatbot-Gpt4Free/main.py", line 2, in
import theb
File "/Users/SS00/Discord-Chatbot-Gpt4Free/theb/init.py", line 7, in
from curl_cffi import requests
ModuleNotFoundError: No module named 'curl_cffi'

[PR] Speech recognition

Have been trying to add speech recognition of files (mp3,wav, etc) and note voices without succes yet. It would be interesting to have that feature, by now only achieved read .txt files in the main.py

OCR for images

Hello,

When I ask the bot to solve a OCR for images, I got that answer :
image

Here is the error on the console :
image

I have already set hugging face api key.

Error while deployment

File "/home/pi123/Discord-AI-Chatbot/main.py", line 342
@app_commands.choices(style=[
^
SyntaxError: expression cannot contain assignment, perhaps you meant "=="?

This piece of code is giving. However checking the code i see that there is a comma missing between comic book and Imagine v4 creative

no module named "curl_cffi"

Traceback (most recent call last):
File "D:\idea\Discord-Chatbot-Gpt4Free-main\main.py", line 2, in
import theb
File "D:\idea\Discord-Chatbot-Gpt4Free-main\theb_init_.py", line 7, in
from curl_cffi import requests
ModuleNotFoundError: No module named 'curl_cffi'

yeah, I installed every module that in main.py with "import x" even curl_cffi, and this is not working, maybe im stupid or like that
discord token also taken from right place

Error at startup.

Traceback (most recent call last):
File "/home/runner/Discord-AI-Chatbot/venv/lib/python3.10/site-packages/requests_toolbelt/_compat.py", line 48, in
from requests.packages.urllib3.contrib import appengine as gaecontrib
ImportError: cannot import name 'appengine' from 'requests.packages.urllib3.contrib' (/home/runner/Discord-AI-Chatbot/venv/lib/python3.10/site-packages/urllib3/contrib/init.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 11, in
from imaginepy import AsyncImagine, Style, Ratio
File "/home/runner/Discord-AI-Chatbot/venv/lib/python3.10/site-packages/imaginepy/init.py", line 1, in
from .sync_imagine import Imagine
File "/home/runner/Discord-AI-Chatbot/venv/lib/python3.10/site-packages/imaginepy/sync_imagine.py", line 3, in
from requests_toolbelt.multipart.encoder import MultipartEncoder
File "/home/runner/Discord-AI-Chatbot/venv/lib/python3.10/site-packages/requests_toolbelt/init.py", line 12, in
from .adapters import SSLAdapter, SourceAddressAdapter
File "/home/runner/Discord-AI-Chatbot/venv/lib/python3.10/site-packages/requests_toolbelt/adapters/init.py", line 12, in
from .ssl import SSLAdapter
File "/home/runner/Discord-AI-Chatbot/venv/lib/python3.10/site-packages/requests_toolbelt/adapters/ssl.py", line 16, in
from .._compat import poolmanager
File "/home/runner/Discord-AI-Chatbot/venv/lib/python3.10/site-packages/requests_toolbelt/_compat.py", line 50, in
from urllib3.contrib import appengine as gaecontrib
ImportError: cannot import name 'appengine' from 'urllib3.contrib' (/home/runner/Discord-AI-Chatbot/venv/lib/python3.10/site-packages/urllib3/contrib/init.py)

!bonk command no longer works

For several commits now, !bonk does not work. After using it, the bot will not respond.

Looks like the command is clearing the chatlog variables incorrectly.

Relevant error logs:

2023-05-04 20:32:14 ERROR    discord.client Ignoring exception in on_message
Traceback (most recent call last):
  File "/installpath/Discord-Chatbot-Gpt4Free/venv/lib/python3.9/site-packages/discord/client.py", line 441, in _run_event
    await coro(*args, **kwargs)
  File "/installpath/Discord-Chatbot-Gpt4Free/main.py", line 47, in on_message
    message_history[author_type].append(message.content)
KeyError: 'b'
2023-05-04 20:32:50 ERROR    discord.client Ignoring exception in on_message
Traceback (most recent call last):
  File "/installpath/Discord-Chatbot-Gpt4Free/venv/lib/python3.9/site-packages/discord/client.py", line 441, in _run_event
    await coro(*args, **kwargs)
  File "/installpath/Discord-Chatbot-Gpt4Free/main.py", line 47, in on_message
    message_history[author_type].append(message.content)
KeyError: 'user'

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.