You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While attempting to use FreeGPT4_Server.py, I encountered a TypeError. The error occurs when the server attempts to process a GET request.
The error message indicates that an issue arises in the create_message function of the Bing.py file, specifically when trying to use the "|" operator with two dictionaries. Here's the traceback for the error:
Traceback (most recent call last):
File "/home/chris/.local/lib/python3.8/site-packages/flask/app.py", line 1455, in wsgi_app
response = self.full_dispatch_request()
File "/home/chris/.local/lib/python3.8/site-packages/flask/app.py", line 869, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/chris/.local/lib/python3.8/site-packages/flask/app.py", line 867, in full_dispatch_request
rv = self.dispatch_request()
File "/home/chris/.local/lib/python3.8/site-packages/flask/app.py", line 852, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/chris/.local/lib/python3.8/site-packages/asgiref/sync.py", line 277, in __call__
return call_result.result()
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 437, in result
return self.__get_result()
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
File "/home/chris/.local/lib/python3.8/site-packages/asgiref/sync.py", line 353, in main_wrap
result = await self.awaitable(*args, **kwargs)
File "FreeGPT4_Server.py", line 133, in index
await PROVIDERS[args.provider].create_async(
File "/home/chris/.local/lib/python3.8/site-packages/g4f/Provider/base_provider.py", line 122, in create_async
return "".join([
File "/home/chris/.local/lib/python3.8/site-packages/g4f/Provider/base_provider.py", line 122, in <listcomp>
return "".join([
File "/home/chris/.local/lib/python3.8/site-packages/g4f/Provider/Bing.py", line 447, in stream_generate
await wss.send_str(create_message(conversation, prompt, tone, context))
File "/home/chris/.local/lib/python3.8/site-packages/g4f/Provider/Bing.py", line 392, in create_message
'message': Defaults.location | {
TypeError: unsupported operand type(s) for |: 'dict' and 'dict'
This error prevents the server from functioning as expected. Could you please provide guidance on how to resolve this issue?
The text was updated successfully, but these errors were encountered:
@us254 After inspecting the code, it seems that the issue is related to the G4F's Bing provider. Could you please let me know what version of g4f you have installed?
While attempting to use FreeGPT4_Server.py, I encountered a TypeError. The error occurs when the server attempts to process a GET request.
The error message indicates that an issue arises in the create_message function of the Bing.py file, specifically when trying to use the "|" operator with two dictionaries. Here's the traceback for the error:
This error prevents the server from functioning as expected. Could you please provide guidance on how to resolve this issue?
The text was updated successfully, but these errors were encountered: