FuseFairy / DiscordBot-EdgeGPT

Using Copilot, Bing Image Creator and DALLE-3 on Discord bot.
GNU General Public License v2.0
160 stars 41 forks source link

Problem starting the bot #96

Closed LuminarySage closed 12 months ago

LuminarySage commented 1 year ago

So I ran pip install -r requirements.txt, renamed .env.dev to .env and filled out DISCORD_BOT_TOKEN, and pasted my cookies into cookies.json but somehow it's still complaining that EdgeGPT module is missing? image

I can even see it under ib site-packages and I set the PATH variable to point to site-packages already too image

FuseFairy commented 1 year ago

Check if the edgegpt version is 0.11.2

LuminarySage commented 1 year ago

It is indeed 0.11.2 image

FuseFairy commented 1 year ago

what's your python version?

LuminarySage commented 1 year ago

3.11.4

FuseFairy commented 1 year ago

Maybe is python version problem, I'm using 3.9.16

LuminarySage commented 1 year ago

Oh was this fixed? What was the problem?

FuseFairy commented 1 year ago

no, I'm can work in python version 3.11.4, try running this simple code if you can

import asyncio, json
from EdgeGPT.EdgeGPT import Chatbot, ConversationStyle

async def main():
    cookies = json.loads(open("./path/to/cookies.json", encoding="utf-8").read())
    bot = await Chatbot.create(cookies=cookies)
    response = await bot.ask(prompt="Hello world", conversation_style=ConversationStyle.creative, simplify_response=True)
    print(json.dumps(response, indent=2))

    await bot.close()

if __name__ == "__main__":
    asyncio.run(main())
LuminarySage commented 1 year ago

Run this in the python interpreter?

FuseFairy commented 1 year ago

yes

LuminarySage commented 1 year ago

This is what I got after running the snippet above

image

FuseFairy commented 1 year ago

oh, you have to modify the location where you put cookies

LuminarySage commented 1 year ago

In what file is the cookies path stored?

LuminarySage commented 1 year ago

Oh wait I got what you meant

LuminarySage commented 1 year ago

Similar error

image

FuseFairy commented 1 year ago

API has error, waiting for fixes

FuseFairy commented 1 year ago

My chatbot can working now, but I still can't reproduce this error.

LuminarySage commented 1 year ago

Will try to start from the beginning with a new copy of the repo and report back