IntelligenzaArtificiale / Free-Auto-GPT

Free Auto GPT with NO paids API is a repository that offers a simple version of Auto GPT, an autonomous AI agent capable of performing tasks independently. Unlike other versions, our implementation does not rely on any paid OpenAI API, making it accessible to anyone.
MIT License
2.43k stars 382 forks source link

Chatgpt 4 - Could not parse your authentication token. #144

Closed akupka closed 1 year ago

akupka commented 1 year ago

Have you already searched for your ISSUE among the resolved ones?

What version of Python do you have?

What version of operating system do you have?

What type of installation did you perform?

Desktop (please complete the following information):

Describe the bug I got the Error message: Could not parse your authentication token. I copy the authentication token from the developer console from Chrome and Firefox. I tried the several times, with relogin and closing browser session.

Here is the complete error message:

Entering new chain... Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/revChatGPT/V1.py", line 699, in __check_response response.raise_for_status() File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://bypass.churchless.tech/conversation

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/workspace/FreeAutoGPT/BABYAGI.py", line 194, in baby_agi({"objective": OBJECTIVE}) File "/usr/local/lib/python3.10/site-packages/langchain/chains/base.py", line 166, in call raise e File "/usr/local/lib/python3.10/site-packages/langchain/chains/base.py", line 160, in call self._call(inputs, run_manager=run_manager) File "/workspace/FreeAutoGPT/BabyAgi/BabyAGIMod.py", line 146, in _call result = self.execute_task(objective, task["task_name"]) File "/workspace/FreeAutoGPT/BabyAgi/BabyAGIMod.py", line 110, in execute_task return self.execution_chain.run( File "/usr/local/lib/python3.10/site-packages/langchain/chains/base.py", line 293, in run return self(kwargs, callbacks=callbacks, tags=tags)[_output_key] File "/usr/local/lib/python3.10/site-packages/langchain/chains/base.py", line 166, in call raise e File "/usr/local/lib/python3.10/site-packages/langchain/chains/base.py", line 160, in call self._call(inputs, run_manager=run_manager) File "/usr/local/lib/python3.10/site-packages/langchain/agents/agent.py", line 987, in _call next_step_output = self._take_next_step( File "/usr/local/lib/python3.10/site-packages/langchain/agents/agent.py", line 792, in _take_next_step output = self.agent.plan( File "/usr/local/lib/python3.10/site-packages/langchain/agents/agent.py", line 443, in plan full_output = self.llm_chain.predict(callbacks=callbacks, full_inputs) File "/usr/local/lib/python3.10/site-packages/langchain/chains/llm.py", line 252, in predict return self(kwargs, callbacks=callbacks)[self.output_key] File "/usr/local/lib/python3.10/site-packages/langchain/chains/base.py", line 166, in call raise e File "/usr/local/lib/python3.10/site-packages/langchain/chains/base.py", line 160, in call self._call(inputs, run_manager=run_manager) File "/usr/local/lib/python3.10/site-packages/langchain/chains/llm.py", line 92, in _call response = self.generate([inputs], run_manager=run_manager) File "/usr/local/lib/python3.10/site-packages/langchain/chains/llm.py", line 102, in generate return self.llm.generate_prompt( File "/usr/local/lib/python3.10/site-packages/langchain/llms/base.py", line 141, in generate_prompt return self.generate(prompt_strings, stop=stop, callbacks=callbacks, kwargs) File "/usr/local/lib/python3.10/site-packages/langchain/llms/base.py", line 227, in generate output = self._generate_helper( File "/usr/local/lib/python3.10/site-packages/langchain/llms/base.py", line 178, in _generate_helper raise e File "/usr/local/lib/python3.10/site-packages/langchain/llms/base.py", line 165, in _generate_helper self._generate( File "/usr/local/lib/python3.10/site-packages/langchain/llms/base.py", line 527, in _generate else self._call(prompt, stop=stop, kwargs) File "/workspace/FreeAutoGPT/FreeLLM/ChatGPTAPI.py", line 47, in _call response = self.chatbot(prompt) File "/usr/local/lib/python3.10/site-packages/langchain/llms/base.py", line 365, in call self.generate([prompt], stop=stop, callbacks=callbacks, kwargs) File "/usr/local/lib/python3.10/site-packages/langchain/llms/base.py", line 227, in generate output = self._generate_helper( File "/usr/local/lib/python3.10/site-packages/langchain/llms/base.py", line 178, in _generate_helper raise e File "/usr/local/lib/python3.10/site-packages/langchain/llms/base.py", line 165, in _generate_helper self._generate( File "/usr/local/lib/python3.10/site-packages/langchain/llms/base.py", line 527, in _generate else self._call(prompt, stop=stop, *kwargs) File "/usr/local/lib/python3.10/site-packages/gpt4_openai/init.py", line 35, in _call for data in self.chatbot.ask(prompt=prompt, File "/usr/local/lib/python3.10/site-packages/revChatGPT/V1.py", line 585, in ask yield from self.post_messages( File "/usr/local/lib/python3.10/site-packages/revChatGPT/V1.py", line 538, in post_messages yield from self.send_request( File "/usr/local/lib/python3.10/site-packages/revChatGPT/V1.py", line 372, in __send_request self.check_response(response) File "/usr/local/lib/python3.10/site-packages/revChatGPT/V1.py", line 85, in wrapper out = func(args, **kwargs) File "/usr/local/lib/python3.10/site-packages/revChatGPT/V1.py", line 706, in __check_response raise error from ex revChatGPT.typings.Error: OpenAI: {"detail":{"message":"Could not parse your authentication token. Please try signing in again.","type":"invalid_request_error","param":null,"code":"invalid_jwt"}} (code: 401)

IntelligenzaArtificiale commented 1 year ago

How to get the access token

  1. Go to https://chat.openai.com/api/auth/session

image

OpenAI have update they token system for try to detect anomaly activity

VickyHax commented 12 months ago

I thought this was the answer but I continued to get the GOAWAY error, I'll try again tomorrow - maybe I'm using the wrong directory