File "gpt4free/g4f/Provider/Providers/helpers/bing.py", line 181, in create
'conversationSignature': conversationSignature,
UnboundLocalError: local variable 'conversationSignature' referenced before assignment
and so 'conversationSignature' is not initialized ;-(
Got :
```
File "gpt4free/g4f/Provider/Providers/helpers/bing.py", line 181, in create
'conversationSignature': conversationSignature,
UnboundLocalError: local variable 'conversationSignature' referenced before assignment
```
Seems that the first call returns garbage :
```
https://edgeservices.bing.com/edgesvc/turing/conversation/create
```
and so 'conversationSignature' is not initialized ;-(
just replace line 9 in gpt4free/g4f/Provider/Providers/helpers/bing.py
#import requests
from curl_cffi import requests
and it works like a charm ;-)
I've got a patch ;-)
just replace line 9 in gpt4free/g4f/Provider/Providers/helpers/bing.py
~~#import requests~~
from curl_cffi import requests
and it works like a charm ;-)
Traceback (most recent call last): File "E:\AI\test\freegpt-webui-portable\g4f\Provider\Providers\helpers\bing.py", line 220, in asyncio.run(run(optionSet, config['messages'])) File "E:\AI\test\freegpt-webui-portable\python\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "E:\AI\test\freegpt-webui-portable\python\lib\asyncio\base_events.py", line 649, in run_until_complete return future.result() File "E:\AI\test\freegpt-webui-portable\g4f\Provider\Providers\helpers\bing.py", line 214, in run async for value in AsyncCompletion.create(prompt=messages[-1]['content'], File "E:\AI\test\freegpt-webui-portable\g4f\Provider\Providers\helpers\bing.py", line 177, in create 'conversationSignature': conversationSignature, UnboundLocalError: local variable 'conversationSignature' referenced before assignment
I applied the patch but still get an error
Traceback (most recent call last): File "E:\AI\test\freegpt-webui-portable\g4f\Provider\Providers\helpers\bing.py", line 220, in <module> asyncio.run(run(optionSet, config['messages'])) File "E:\AI\test\freegpt-webui-portable\python\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "E:\AI\test\freegpt-webui-portable\python\lib\asyncio\base_events.py", line 649, in run_until_complete return future.result() File "E:\AI\test\freegpt-webui-portable\g4f\Provider\Providers\helpers\bing.py", line 214, in run async for value in AsyncCompletion.create(prompt=messages[-1]['content'], File "E:\AI\test\freegpt-webui-portable\g4f\Provider\Providers\helpers\bing.py", line 177, in create 'conversationSignature': conversationSignature, UnboundLocalError: local variable 'conversationSignature' referenced before assignment
Got :
Seems that the first call returns garbage :
and so 'conversationSignature' is not initialized ;-(
I've got a patch ;-)
just replace line 9 in gpt4free/g4f/Provider/Providers/helpers/bing.py
#import requestsfrom curl_cffi import requests
and it works like a charm ;-)
And here is a PR #10
I applied the patch but still get an error
Traceback (most recent call last): File "E:\AI\test\freegpt-webui-portable\g4f\Provider\Providers\helpers\bing.py", line 220, in asyncio.run(run(optionSet, config['messages'])) File "E:\AI\test\freegpt-webui-portable\python\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "E:\AI\test\freegpt-webui-portable\python\lib\asyncio\base_events.py", line 649, in run_until_complete return future.result() File "E:\AI\test\freegpt-webui-portable\g4f\Provider\Providers\helpers\bing.py", line 214, in run async for value in AsyncCompletion.create(prompt=messages[-1]['content'], File "E:\AI\test\freegpt-webui-portable\g4f\Provider\Providers\helpers\bing.py", line 177, in create 'conversationSignature': conversationSignature, UnboundLocalError: local variable 'conversationSignature' referenced before assignment