-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Error when using OPEN AI API #278
Comments
Hi @tstanek390 thanks for raising this. Did you try doing like so |
Also you can test if it exists by adding these lines to the main.py file:
|
thanks for the answer, stupid me, i put brackets on the api key itself, and that was the reason behing the error. Now its working perfectly, thanks a lot for great project, big ups! :) |
Great to hear! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have an issue with running the client with open ai API, tried to export the key as shown and stated in docs, tried to create .env file, reinstalled the whole repo and deps several times, but I'm still getting this:
File "/Users/admin/miniforge3/envs/research/lib/python3.11/site-packages/openai/_base_client.py", line 885, in _request
raise self._make_status_error_from_response(err.response) from None
openai.AuthenticationError: Error code: 401 - {'error': {'message': 'Incorrect API key provided: {sk-IvWw*****************************************gl9}. You can find your API key at https://platform.openai.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}}
The API key is working with all other services and tasks, but GPT-researcher, tried a dozen of newly generated keys too, with different companies. All without a success.
What could cause the issue?
Cheers
The text was updated successfully, but these errors were encountered: