gpt4free
gpt4free copied to clipboard
Why all of a sudden using g4f and getting the GPT with the corresponding empty string?
def request_chatgpt(content):
response = g4f.ChatCompletion.create(
model=g4f.models.gpt_35_turbo,
messages=[{"role": "user", "content": content}],
provider=OpenaiChat,
auth=cookie,
) # Alternative model setting
print('ChatGPT响应: ', response)
return response
I've been using g4f and it's working fine, however, just now I realized that I'm getting responses that are all empty, but it's fine to post a dialog to GPT on the web.
Is the openai server detecting this client.
I upgraded to the latest version (2.0.9) and still no result.
Traceback (most recent call last):
File "/app/g4f/gui/server/backend.py", line 185, in _create_response_stream
for chunk in ChatCompletion.create(**kwargs):
File "/app/g4f/Provider/base_provider.py", line 201, in create_completion
yield loop.run_until_complete(gen.__anext__())
File "/home/g4f/.local/lib/python3.10/site-packages/nest_asyncio.py", line 98, in run_until_complete
return f.result()
File "/usr/lib/python3.10/asyncio/futures.py", line 201, in result
raise self._exception.with_traceback(self._exception_tb)
File "/usr/lib/python3.10/asyncio/tasks.py", line 232, in __step
result = coro.send(None)
File "/app/g4f/Provider/needs_auth/OpenaiChat.py", line 378, in create_async_generator
raise RuntimeError(f"Response {response.status_code}: {await response.text()}")
RuntimeError: Response 400: {"detail":{"message":"Requests with `action=continue` must have a conversation_id and parent_message_id.","code":"continue_with_messages"}}
I ran the client with docker and then saw this error log in the terminal.
Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.
Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.
How did you called OpenaiChat. Did you set a api_key?
Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.
Closing due to inactivity.