-
-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
An error occured: OpenaiChat: MissingAuthError: Add a "api_key" or a .har file #2092
Comments
Have you added chatgpt.com.har? |
Not a bug, Need to use api key or use a .har file with the cookies from the chatgpt website and keep it in the har_and_cookies folder |
i was hoping can there be a chrome extension be made that can fetch har and integrate with gpt4free |
I think it's difficult to get it with an extension. |
how can it be fixed then? becuase i dont know how to add the .har file and where. could somone provide a more detailed explenation on how to do it? |
Obtaining the HAR file from ChatGPTHere's a method to obtain the HAR (HTTP Archive) file from ChatGPT:
At this point, you can right-click on any of the requests and select "Save as HAR" to download the HAR file. Note: The exact request count may vary slightly depending on the specific interaction and browser used. |
@gamelist1990 I did all the steps but it still sends the same error. I downloaded the har file (as "chatgpt.com") and put it in the same directory as the g4f file (C:\Users\user\Downloads\coding related stuff\g4f.exe). did I do something wrong? P.S. Thanks for the help. Appreciate it. |
If u downloaded the github repo, you can keep it in the har_and_cookies folder. Dont know where to keep incase of g4f.exe |
I don't have a har_and_cookies folder, should I create one in the g4f directory? |
ok, I now downloaded it correctly, I think, using "pip install g4f" in cmd. is that ok? if yes what do I do now? |
What should I do in the case of g4f.exe? It doesn't change, but g4f.exe seems to just be running flask internally, so place g4f.exe and the har_and_cookies folder in the directory and put the har file in it. |
Hello, |
@Lorodn4x |
@iG8R Thank you for your response. In my country, ChatGPT does not work without a VPN. Even when I follow all the steps using the VPN, I occasionally receive messages stating that the service is not available in my region or something similar. I have encountered this error again and attached a screenshot for further clarification |
@Lorodn4x |
@gamelist1990 |
Also I used your last PR fea9e7a |
It looks like Arkose authentication has passed, but then a 502 error appears For now, if you get a 502 error even after trying several times, try changing the model to auto or something similar. I use the auto model. |
That fix solved the Arkose issue so it's fine. |
As you can see, not every time I got a 502 error, sometimes there is a "No arkose token found in .har file" error and sometimes there is an "OK" response. |
Can you try the model with auto? |
Umm |
I use the following app and browser extension to make a request to |
I'll take a look. |
By the way, I tried to fix that just now, but it failed spectacularly (^^) |
Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again. |
up |
|
Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again. |
up |
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. |
up |
Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again. |
I think this issue is fixed now? |
No. |
I also am having this issue. I am in the us, I get the har file and post it and run this code before the issue arises. Any advice for even a workaround? from g4f.client import Client import g4f.debug client = Client(provider=OpenaiChat) |
@tmcnairbledsoe @iG8R @dabatz We found that the current OpenAI certification uses Bearer certification |
@gamelist1990 |
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. |
The text was updated successfully, but these errors were encountered: