Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

g4f.errors.ResponseStatusError: Response 403: {"detail":{"error":"Not authenticated"}} #1904

Closed
mahditorabi76 opened this issue Apr 28, 2024 · 5 comments
Assignees
Labels
bug Something isn't working stale

Comments

@mahditorabi76
Copy link

mahditorabi76 commented Apr 28, 2024

my code

client = Client(provider='DeepInfra')

response_q = client.chat.completions.create(model="meta-llama/Meta-Llama-3-70B-Instruct",
extra_body={"provider": "DeepInfra"},
messages=[{"role": "user", "content": prompt}])

error
Traceback (most recent call last):
File "", line 1, in
File "c:\Users\lenovo\Desktop\Projects\GTP4FREE\venv\lib\site-packages\g4f\client\client.py", line 114, in create
return response if stream else next(response)
File "c:\Users\lenovo\Desktop\Projects\GTP4FREE\venv\lib\site-packages\g4f\client\client.py", line 53, in iter_append_model_and_provider
for chunk in response:
File "c:\Users\lenovo\Desktop\Projects\GTP4FREE\venv\lib\site-packages\g4f\client\client.py", line 28, in iter_response
for idx, chunk in enumerate(response):
File "c:\Users\lenovo\Desktop\Projects\GTP4FREE\venv\lib\site-packages\g4f\providers\base_provider.py", line 216, in create_completion
yield loop.run_until_complete(await_callback(gen.anext))
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete
return future.result()
File "c:\Users\lenovo\Desktop\Projects\GTP4FREE\venv\lib\site-packages\g4f\providers\base_provider.py", line 45, in await_callback
return await callback()
File "c:\Users\lenovo\Desktop\Projects\GTP4FREE\venv\lib\site-packages\g4f\Provider\needs_auth\Openai.py", line 56, in create_async_generator
await raise_for_status(response)
File "c:\Users\lenovo\Desktop\Projects\GTP4FREE\venv\lib\site-packages\g4f\requests\raise_for_status.py", line 28, in raise_for_status_async
raise ResponseStatusError(f"Response {response.status}: {message}")
g4f.errors.ResponseStatusError: Response 403: {"detail":{"error":"Not authenticated"}}

@mahditorabi76 mahditorabi76 added the bug Something isn't working label Apr 28, 2024
@hlohaus
Copy link
Collaborator

hlohaus commented Apr 29, 2024

Hey there! It seems like the free GPT model might not be accessible in your region. Have you tried using the Llama model? Let me know if that works for you!

@mahditorabi76
Copy link
Author

Hey there! It seems like the free GPT model might not be accessible in your region. Have you tried using the Llama model? Let me know if that works for you!

Yes, i use Llama but same error

@hlohaus
Copy link
Collaborator

hlohaus commented May 1, 2024

Hey, DeepInfra shut down their free service. You should try using the Llama provider instead.

Copy link

github-actions bot commented May 9, 2024

Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.

@github-actions github-actions bot added the stale label May 9, 2024
Copy link

Closing due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

3 participants