acheong08 / EdgeGPT

Reverse engineered API of Microsoft's Bing Chat AI
The Unlicense
8.07k stars 909 forks source link

KeyError: 'suggestedResponses' #605

Closed MaximMoser1994 closed 1 year ago

MaximMoser1994 commented 1 year ago

Is there an existing issue for this?

What happened?

until today my scripts that query Bing api worked fine. Today they throw the same error:" KeyError: 'suggestedResponses'"

Steps to reproduce the problem

  1. Go to ....
  2. Press ....
  3. ...

What should have happened?

working without error

Version where the problem happens

Name: EdgeGPT Version: 0.11.4

What Python version are you running this with?

Python 3.8.10

What is your operating system ?

Linux

Command Line Arguments

No

Console logs

KeyError                                  Traceback (most recent call last)

/tmp/ipykernel_529984/1487610102.py in <cell line: 83>()

     88 

     89     schleife = asyncio.get_event_loop()

---> 90     schleife.run_until_complete(main())

~/mage/venv/lib/python3.8/site-packages/nest_asyncio.py in run_until_complete(self, future)

     88                 raise RuntimeError(

     89                     'Event loop stopped before Future completed.')

---> 90             return f.result()

     91 

     92     def _run_once(self):

/usr/lib/python3.8/asyncio/futures.py in result(self)

    176         self.__log_traceback = False

    177         if self._exception is not None:

--> 178             raise self._exception

    179         return self._result

    180 

/usr/lib/python3.8/asyncio/tasks.py in __step(***failed resolving arguments***)

    278                 # We use the `send` method directly, because coroutines

    279                 # don't have `__iter__` and `__next__` methods.

--> 280                 result = coro.send(None)

    281             else:

    282                 result = coro.throw(exc)

/tmp/ipykernel_529984/1487610102.py in main()

     51 

     52     # try:

---> 53     response = await bot.ask(prompt=promt, conversation_style=ConversationStyle.precise, simplify_response=True)

     54     # Parse den JSON-String in ein Python-Dictionary

     55     text = response["text"]

~/mage/venv/lib/python3.8/site-packages/EdgeGPT/EdgeGPT.py in ask(self, prompt, wss_link, conversation_style, webpage_context, search_result, locale, simplify_response)

    140                     "suggestions": [

    141                         suggestion["text"]

--> 142                         for suggestion in message["suggestedResponses"]

    143                     ],

    144                     "messages_left": response["item"]["throttling"][

KeyError: 'suggestedResponses'

Additional information

No response

MaximMoser1994 commented 1 year ago

this was obviously a problem on Microsoft's part. Today everything works