🥷 docs: Ninja - ChatGPT-browser reverse proxy (#1697)

* 🥷  docs: Ninja ChatGPT-browser reverse proxy

* 🥷  docs: breaking changes
This commit is contained in:
Fuegovic 2024-02-01 01:44:51 -05:00 committed by GitHub
parent a9220375d3
commit 2b4870892a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 165 additions and 2 deletions

View file

@ -446,6 +446,27 @@ OpenRouter is integrated to the LibreChat by overriding the OpenAI endpoint.
**Important:** Stability for Unofficial APIs are not guaranteed. Access methods to these APIs are hacky, prone to errors, and patching, and are marked lowest in priority in LibreChat's development.
### ChatGPTBrowser
**Backend Access to https://chat.openai.com/api**
This is not to be confused with [OpenAI's Official API](#openai)!
> Note that this is disabled by default and requires additional configuration to work.
> Also, using this may have your data exposed to 3rd parties if using a proxy, and OpenAI may flag your account.
> See: [ChatGPT Reverse Proxy](../../features/ninja.md)
To get your Access token for ChatGPT Browser Access, you need to:
- Go to **[https://chat.openai.com](https://chat.openai.com)**
- Create an account or log in with your existing one
- Visit **[https://chat.openai.com/api/auth/session](https://chat.openai.com/api/auth/session)**
- Copy the value of the "accessToken" field and save it in ./.env as CHATGPT_ACCESS_TOKEN
Warning: There may be a chance of your account being banned if you deploy the app to multiple users with this method. Use at your own risk.
---
### BingAI
I recommend using Microsoft Edge for this:

View file

@ -135,7 +135,7 @@ In this section you can configure the endpoints and models selection, their API
- `PROXY` is to be used by all endpoints (leave blank by default)
```bash
ENDPOINTS=openAI,azureOpenAI,bingAI,google,gptPlugins,anthropic
ENDPOINTS=openAI,azureOpenAI,bingAI,chatGPTBrowser,google,gptPlugins,anthropic
PROXY=
```
@ -245,6 +245,28 @@ BINGAI_TOKEN=user_provided
BINGAI_HOST=
```
### ChatGPT
see: [ChatGPT Free Access token](../configuration/ai_setup.md#chatgptbrowser)
> **Warning**: To use this endpoint you'll have to set up your own reverse proxy. Here is the installation guide to deploy your own (based on [Ninja](https://github.com/gngpp/ninja)): **[Ninja Deployment Guide](../../features/ninja.md)**
```bash
CHATGPT_REVERSE_PROXY=<YOUR-REVERSE-PROXY>
```
> **Note:** If you're a GPT plus user you can try adding `gpt-4`, `gpt-4-plugins`, `gpt-4-code-interpreter`, and `gpt-4-browsing` to the list above and use the models for these features; **however, the view/display portion of these features are not supported**, but you can use the underlying models, which have higher token context
> This method **might only works** with `text-davinci-002-render-sha` and **might stop working** at any moment.
- Leave `CHATGPT_TOKEN=` blank to disable this endpoint
- Set `CHATGPT_TOKEN=` to "user_provided" to allow users to provide their own API key from the WebUI
- It is not recommended to provide your token in the `.env` file since it expires often and sharing it could get you banned.
```bash
CHATGPT_TOKEN=
CHATGPT_MODELS=text-davinci-002-render-sha
```
### Google
Follow these instructions to setup the [Google Endpoint](./ai_setup.md#google)