acheong08 / EdgeGPT

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

[Bug]: local variable 'message' referenced before assignment when using simplify_response #599

Closed Eikosa closed 1 year ago

Eikosa commented 1 year ago

Is there an existing issue for this?

What happened?

  File "/root/userbott/main.py", line 4923, in bing_chat
    get = await vars.bing.ask(prompt=prompt, conversation_style=ConversationStyle.creative, simplify_response=True)
  File "/usr/local/lib/python3.10/dist-packages/EdgeGPT/EdgeGPT.py", line 140, in ask
    if not message:
UnboundLocalError: local variable 'message' referenced before assignment

This error only occurs when using "simplify_response=True"

Steps to reproduce the problem

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

What should have happened?

.

Version where the problem happens

latest version

What Python version are you running this with?

No response

What is your operating system ?

No response

Command Line Arguments

.

Console logs

.

Additional information

No response