ediziks / BingGPT-Discord-Bot

BingGPT Discord Bot that can handle /ask & /imagine prompts using reverse engineered API of Microsoft's Bing Chat under the hood
The Unlicense
119 stars 14 forks source link

error #25

Closed pqr29 closed 1 year ago

pqr29 commented 1 year ago

PS C:\Users\usuario\Downloads\BingGPT-Discord-Bot> python src/bot.py Traceback (most recent call last): File "C:\Users\usuario\Downloads\BingGPT-Discord-Bot\src\bot.py", line 44, in gptbot = Chatbot(cookie_path='cookies.json') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\usuario\Downloads\BingGPT-Discord-Bot\src\EdgeGPT.py", line 603, in init self.chat_hub: _ChatHub = _ChatHub( ^^^^^^^^^ File "C:\Users\usuario\Downloads\BingGPT-Discord-Bot\src\EdgeGPT.py", line 415, in init conversation_signature=conversation.struct["conversationSignature"],


KeyError: 'conversationSignature'
de-joit commented 1 year ago

Same problem

xrmaalk commented 1 year ago

Hi guys, I was able to get the code working by adjusting line 415 EdgeGPT.py .

I added the .get method to the .struct which solved the error. here is the adjusted code snippet:

self.request = _ChatHubRequest( conversation_signature=conversation.struct.get("conversationSignature"), client_id=conversation.struct["clientId"], conversation_id=conversation.struct["conversationId"], )

xrmaalk commented 8 months ago

Has anyone got the bot functioning/responding on their discord server?