code-yeongyu/AiShell

Use Access Token instead of Session Token

code-yeongyu opened this issue · 1 comments

This issue contains the content of #52:

As a solution of this, I am thinking of:

1. Update config json like following
  ```json
{
    "language_model": "reverse_engineered_chatgpt",
    "openai_api_key": null,
    "browser": "brave" // firefox, chrome, safari or whatever
}
  1. Replace session token retrieving code as access token retrieving code
  • Using the browser's cookie, send request to https://chat.openai.com/api/auth/session to get the access token
  1. Send request to ChatGPT using configured information from 2

I am thinking of accomplish this by adopt this method to ygka and have ygka as dependency like I have mentioned in #49