You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🐳 : Further Docker build Cleanup & Docs Update (danny-avila#1502)
* refactor: post-cleanup changes:
- add more unnecessary paths to .dockerignore
- remove librechat.yaml from main compose file (prevents from being required)
- do not create librechat.yaml during build (does nothing)
* docs: make config file instructions easier to read, more info throughout other docs
* docs: add custom config to menu
* Update custom_config.md
* Update docker_compose_install.md
Copy file name to clipboardexpand all lines: docs/install/configuration/ai_setup.md
+2
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,8 @@ Using the default environment values from [/.env.example](https://github.com/dan
48
48
49
49
This guide will walk you through setting up each Endpoint as needed.
50
50
51
+
For **custom endpoint** configuration, such as adding [Mistral AI](https://docs.mistral.ai/platform/client/) or [Openrouter](https://openrouter.ai/) refer to the **[librechat.yaml configuration guide](./custom_config.md)**.
52
+
51
53
**Reminder: If you use docker, you should [rebuild the docker image (here's how)](dotenv.md) each time you update your credentials**
52
54
53
55
*Note: Configuring pre-made Endpoint/model/conversation settings as singular options for your users is a planned feature. See the related discussion here: [System-wide custom model settings (lightweight GPTs) #1291](https://github.com/danny-avila/LibreChat/discussions/1291)*
Copy file name to clipboardexpand all lines: docs/install/configuration/custom_config.md
+107-29
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,29 @@
1
+
---
2
+
title: 🖥️ Custom Endpoints & Config
3
+
description: Comprehensive guide for configuring the `librechat.yaml` file AKA the LibreChat Config file. This document is your one-stop resource for understanding and customizing endpoints & other integrations.
4
+
weight: -10
5
+
---
6
+
1
7
# LibreChat Configuration Guide
2
8
3
-
This document provides detailed instructions for configuring the `librechat.yaml` file used by LibreChat.
9
+
Welcome to the guide for configuring the **librechat.yaml** file in LibreChat.
10
+
11
+
This file enables the integration of custom AI endpoints, enabling you to connect with any AI provider compliant with OpenAI API standards.
12
+
13
+
This includes providers like [Mistral AI](https://docs.mistral.ai/platform/client/), as well as reverse proxies that facilitate access to OpenAI servers, adding them alongside existing endpoints like Anthropic.
4
14
5
-
In future updates, some of the configurations from [your `.env` file](./dotenv.md) will migrate here.
@@ -19,10 +33,39 @@ Further customization of the current configurations are also planned.
19
33
-[Breakdown of Default Params](#breakdown-of-default-params)
20
34
-[Example Config](#example-config)
21
35
22
-
## Configuration Overview
36
+
## Setup
37
+
38
+
**The `librechat.yaml` file should be placed in the root of the project where the .env file is located.**
23
39
40
+
You can copy the [example config file](#example-config) as a good starting point while reading the rest of the guide.
24
41
25
-
The `librechat.yaml` file contains several key sections.
42
+
The example config file has some options ready to go for Mistral AI and Openrouter.
43
+
44
+
## Docker Setup
45
+
46
+
For Docker, you need to make use of an [override file](./docker_override), named `docker-compose.override.yml`, to ensure the config file works for you.
47
+
48
+
- First, make sure your containers stop running with `docker-compose down`
49
+
- Create or edit existing `docker-compose.override.yml` at the root of the project:
50
+
51
+
```yaml
52
+
# For more details on the override file, see the Docker Override Guide:
-**Note**: The following are "known endpoints" (case-insensitive), which have icons provided for them. If your endpoint `name` matches these, you should omit this field:
142
+
- **Note**: The following are "known endpoints" (case-insensitive), which have icons provided for them. If your endpoint `name` matches the following names, you should omit this field:
76
143
- "Mistral"
77
144
- "OpenRouter"
78
145
79
-
-**models**: Configuration for models.
80
-
-**Required**
146
+
### **models**:
147
+
> Configuration for models.
148
+
- **Required**
81
149
- **default**: An array of strings indicating the default models to use. At least one value is required.
@@ -87,44 +155,54 @@ Each endpoint in the `custom` array should have the following structure:
87
155
- Example: `fetch: true`
88
156
- **Note**: May cause slowdowns during initial use of the app if the response is delayed. Defaults to `false`.
89
157
90
-
-**titleConvo**: Enables title conversation when set to `true`.
158
+
### **titleConvo**:
159
+
> Enables title conversation when set to `true`.
91
160
- Type: Boolean
92
161
- Example: `titleConvo: true`
93
162
94
-
-**titleMethod**: Chooses between "completion" or "functions" for title method.
163
+
### **titleMethod**:
164
+
> Chooses between "completion" or "functions" for title method.
95
165
- Type: String (`"completion"` | `"functions"`)
96
166
- Example: `titleMethod: "completion"`
97
167
- **Note**: Defaults to "completion" if omitted.
98
168
99
-
-**titleModel**: Specifies the model to use for titles.
169
+
### **titleModel**:
170
+
> Specifies the model to use for titles.
100
171
- Type: String
101
172
- Example: `titleModel: "mistral-tiny"`
102
173
- **Note**: Defaults to "gpt-3.5-turbo" if omitted. May cause issues if "gpt-3.5-turbo" is not available.
103
174
104
-
-**summarize**: Enables summarization when set to `true`.
175
+
### **summarize**:
176
+
> Enables summarization when set to `true`.
105
177
- Type: Boolean
106
178
- Example: `summarize: false`
107
179
- **Note**: This feature requires an OpenAI Functions compatible API
108
180
109
-
-**summaryModel**: Specifies the model to use if summarization is enabled.
181
+
### **summaryModel**:
182
+
> Specifies the model to use if summarization is enabled.
110
183
- Type: String
111
184
- Example: `summaryModel: "mistral-tiny"`
112
185
- **Note**: Defaults to "gpt-3.5-turbo" if omitted. May cause issues if "gpt-3.5-turbo" is not available.
113
186
114
-
-**forcePrompt**: If `true`, sends a `prompt` parameter instead of `messages`.
187
+
### **forcePrompt**:
188
+
> If `true`, sends a `prompt` parameter instead of `messages`.
115
189
- Type: Boolean
116
190
- Example: `forcePrompt: false`
117
-
-**Note**: This combines all messages into a single text payload, [following OpenAI format](https://github.com/pvicente/openai-python/blob/main/chatml.md), and uses the `/completions` endpoint of your baseURL rather than `/chat/completions`.
191
+
- **Note**: This combines all messages into a single text payload, [following OpenAI format](https://github.com/pvicente/openai-python/blob/main/chatml.md), and
118
192
119
-
-**modelDisplayLabel**: The label displayed in messages next to the Icon for the current AI model.
193
+
uses the `/completions` endpoint of your baseURL rather than `/chat/completions`.
194
+
195
+
### **modelDisplayLabel**:
196
+
> The label displayed in messages next to the Icon for the current AI model.
120
197
- Type: String
121
198
- Example: `modelDisplayLabel: "Mistral"`
122
199
- **Note**: The display order is:
123
200
- 1. Custom name set via preset (if available)
124
201
- 2. Label derived from the model name (if applicable)
125
202
- 3. This value, `modelDisplayLabel`, is used if the above are not specified. Defaults to "AI".
126
203
127
-
-**addParams**: Adds additional parameters to requests.
204
+
### **addParams**:
205
+
> Adds additional parameters to requests.
128
206
- Type: Object/Dictionary
129
207
- **Description**: Adds/Overrides parameters. Useful for specifying API-specific options.
130
208
- **Example**:
@@ -133,12 +211,12 @@ Each endpoint in the `custom` array should have the following structure:
133
211
safe_mode: true
134
212
```
135
213
136
-
- **dropParams**: Removes default parameters from requests.
214
+
### **dropParams**:
215
+
> Removes [default parameters](#default-parameters) from requests.
137
216
- Type: Array/List of Strings
138
-
- **Description**: Excludes specified default parameters. Useful for APIs that do not accept or recognize certain parameters.
217
+
- **Description**: Excludes specified [default parameters](#default-parameters). Useful for APIs that do not accept or recognize certain parameters.
Copy file name to clipboardexpand all lines: docs/install/configuration/docker_override.md
+12-1
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,18 @@ Open your `docker-compose.override.yml` file with vscode or any text editor.
34
34
35
35
Make your desired changes by uncommenting the relevant sections and customizing them as needed.
36
36
37
-
For example, if you want to use a prebuilt image for the `api` service and expose MongoDB's port, your `docker-compose.override.yml` might look like this:
37
+
For example, if you want to make sure Docker can use your `librechat.yaml` file for [custom configuration](./custom_config.md), it would look like this:
38
+
39
+
```yaml
40
+
version: '3.4'
41
+
42
+
services:
43
+
api:
44
+
volumes:
45
+
- ./librechat.yaml:/app/librechat.yaml
46
+
```
47
+
48
+
Or, if you want to use a prebuilt image for the `api` service and expose MongoDB's port, your `docker-compose.override.yml` might look like this:
Copy file name to clipboardexpand all lines: docs/install/configuration/dotenv.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: ⚙️ Environment Variables
3
3
description: Comprehensive guide for configuring your application's environment with the `.env` file. This document is your one-stop resource for understanding and customizing the environment variables that will shape your application's behavior in different contexts.
## Integrating the Configuration File in Podman Setup
226
+
227
+
When using Podman for setting up LibreChat, you can also integrate the [`librechat.yaml` configuration file](../configuration/custom_config.md).
228
+
229
+
This file allows you to define specific settings and AI endpoints, such as Mistral AI, tailoring the application to your needs.
230
+
231
+
After creating your `.env` file as detailed in the previous steps, follow these instructions to integrate the `librechat.yaml` configuration:
232
+
233
+
1. Place your `librechat.yaml` file in your project's root directory.
234
+
2. Modify the Podman run command for the LibreChat container to include a volume argument that maps the `librechat.yaml` file inside the container. This can be done by adding the following line to your Podman run command:
235
+
236
+
```bash
237
+
-v "./librechat.yaml:/app/librechat.yaml"
238
+
```
239
+
240
+
For example, the modified Podman run command for starting LibreChat will look like this:
241
+
242
+
```bash
243
+
podman run \
244
+
--name="librechat" \
245
+
--network=librechat \
246
+
--env-file="./.env" \
247
+
-v "./librechat.yaml:/app/librechat.yaml" \
248
+
-p 3080:3080 \
249
+
--detach \
250
+
librechat:local;
251
+
```
252
+
253
+
By mapping the `librechat.yaml` file into the container, Podman ensures that your custom configurations are applied to LibreChat, enabling a tailored AI experience.
254
+
255
+
Ensure that the `librechat.yaml` file is correctly formatted and contains valid settings.
256
+
257
+
Any errors in this file might affect the functionality of LibreChat. For more information on configuring `librechat.yaml`, refer to the [configuration guide](../configuration/custom_config.md).
258
+
259
+
---
260
+
225
261
>⚠️ Note: If you're having trouble, before creating a new issue, please search for similar ones on our [#issues thread on our discord](https://discord.gg/weqZFtD9C4) or our [troubleshooting discussion](https://github.com/danny-avila/LibreChat/discussions/categories/troubleshooting) on our Discussions page. If you don't find a relevant issue, feel free to create a new one and provide as much detail as possible.
0 commit comments