From 908c32c9c146f05f2acc15301bbf18df0259ee75 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Thu, 30 Nov 2023 10:47:16 -0800 Subject: [PATCH] (docs) librechat + proxy --- docs/my-website/docs/simple_proxy.md | 68 ++++++++++++++-------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/docs/my-website/docs/simple_proxy.md b/docs/my-website/docs/simple_proxy.md index 70f669835e4..fd709eab8b3 100644 --- a/docs/my-website/docs/simple_proxy.md +++ b/docs/my-website/docs/simple_proxy.md @@ -259,6 +259,40 @@ response = client.chat.completions.create(model="gpt-3.5-turbo", messages = [ print(response) +``` + + + +### Start the LiteLLM proxy +```shell +litellm --model gpt-3.5-turbo + +#INFO: Proxy running on http://0.0.0.0:8000 +``` + +#### 1. Clone the repo + +```shell +git clone https://github.com/danny-avila/LibreChat.git +``` + + +#### 2. Modify Librechat's `docker-compose.yml` +LiteLLM Proxy is running on port `8000`, set `8000` as the proxy below +```yaml +OPENAI_REVERSE_PROXY=http://host.docker.internal:8000/v1/chat/completions +``` + +#### 3. Save fake OpenAI key in Librechat's `.env` + +Copy Librechat's `.env.example` to `.env` and overwrite the default OPENAI_API_KEY (by default it requires the user to pass a key). +```env +OPENAI_API_KEY=sk-1234 +``` + +#### 4. Run LibreChat: +```shell +docker compose up ``` @@ -359,40 +393,6 @@ result = experts(query='How can I be more productive?') print(result) ``` - - -### Start the LiteLLM proxy -```shell -litellm --model gpt-3.5-turbo - -#INFO: Proxy running on http://0.0.0.0:8000 -``` - -#### 1. Clone the repo - -```shell -git clone https://github.com/danny-avila/LibreChat.git -``` - - -#### 2. Modify Librechat's `docker-compose.yml` -LiteLLM Proxy is running on port `8000`, set `8000` as the proxy below -```yaml -OPENAI_REVERSE_PROXY=http://host.docker.internal:8000/v1/chat/completions -``` - -#### 3. Save fake OpenAI key in Librechat's `.env` - -Copy Librechat's `.env.example` to `.env` and overwrite the default OPENAI_API_KEY (by default it requires the user to pass a key). -```env -OPENAI_API_KEY=sk-1234 -``` - -#### 4. Run LibreChat: -```shell -docker compose up -``` - ## Proxy Configs