This repository was archived by the owner on Oct 23, 2023. It is now read-only.
The problem of not executing the code (error 401) #37
Unanswered
seyedrezabazyar
asked this question in
General
Replies: 2 comments
|
It appears that your OpenAI key may not have been loaded correctly. Could you add the line For best practices, we recommend storing your |
0 replies
|
I removed getenv from the code and the problem was solved But the texts produced through API have a much lower quality than the ChatGPT website :( |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I ran the following code
But I got this error while running:
Fatal error: Uncaught Tectalic\OpenAi\ClientException: Unsuccessful response. HTTP status code: 401 (Unauthorized). in /private/var/www/chatgpt/vendor/tectalic/openai/src/Handlers/ChatCompletions.php:150 Stack trace: #0 /private/var/www/chatgpt/index.php(21): Tectalic\OpenAi\Handlers\ChatCompletions->toModel() #1 {main} thrown in /private/var/www/chatgpt/vendor/tectalic/openai/src/Handlers/ChatCompletions.php on line 150My api is completely correct and I changed it several times but still it doesn't work.
I am using the free version of chatgpt and I want to test it and if it works, I will buy the premium account of chatgpt.
How can I fix this problem?
All reactions