Compare commits
No commits in common. "ee7bbad3895dff15f26281db86142503543d4d95" and "c8ca3e133816252c85c355e9625c67e883e018b1" have entirely different histories.
ee7bbad389
...
c8ca3e1338
5
.env
5
.env
|
@ -1,8 +1,3 @@
|
||||||
# If set, HTTP_PROXY messes with inter-container communication in the deployment.
|
|
||||||
# Ollama downloads the models via https anyway so it should be safe to unset it
|
|
||||||
HTTP_PROXY=
|
|
||||||
http_proxy=
|
|
||||||
|
|
||||||
#=============================================================#
|
#=============================================================#
|
||||||
# LibreChat Configuration #
|
# LibreChat Configuration #
|
||||||
#=============================================================#
|
#=============================================================#
|
||||||
|
|
18
README.md
18
README.md
|
@ -1,6 +1,6 @@
|
||||||
# librechat-mistral
|
# librechat-mistral
|
||||||
|
|
||||||
A quick prototype to self-host [LibreChat](https://github.com/danny-avila/LibreChat) backed by a locally-run [Mistral](https://mistral.ai/news/announcing-mistral-7b/) model, and an OpenAI-like api provided by [LiteLLM](https://github.com/BerriAI/litellm) on the side.
|
A quick prototype to self-host [LibreChat](https://github.com/danny-avila/LibreChat) with [Mistral](https://mistral.ai/news/announcing-mistral-7b/), and an OpenAI-like api provided by [LiteLLM](https://github.com/BerriAI/litellm) on the side.
|
||||||
|
|
||||||
## Goals
|
## Goals
|
||||||
|
|
||||||
|
@ -38,16 +38,7 @@ A quick prototype to self-host [LibreChat](https://github.com/danny-avila/LibreC
|
||||||
6. Browse http://localhost:3080/
|
6. Browse http://localhost:3080/
|
||||||
7. Create an admin account and start chatting!
|
7. Create an admin account and start chatting!
|
||||||
|
|
||||||
### Steps for NO GPU (use CPU)
|
The API along with the APIDoc will be available at http://localhost:8000/
|
||||||
|
|
||||||
**Warning: This may be very slow depending on your CPU and may us a lot of RAM depending on the model**
|
|
||||||
|
|
||||||
1. Make sure your drivers are up to date.
|
|
||||||
2. Clone the repo.
|
|
||||||
3. Copy the CPU compose spec to select it. `cp docker-compose.cpu.yml docker.compose.yml`
|
|
||||||
4. Run `docker compose up`. Wait for a few minutes for the model to be downloaded and served.
|
|
||||||
5. Browse http://localhost:3080/
|
|
||||||
6. Create an admin account and start chatting!
|
|
||||||
|
|
||||||
## Configuring additional models
|
## Configuring additional models
|
||||||
|
|
||||||
|
@ -94,8 +85,3 @@ eg:
|
||||||
* [LibreChat](https://github.com/danny-avila/LibreChat) is a ChatGPT clone with support for multiple AI endpoints. It's deployed alongside a [MongoDB](https://github.com/mongodb/mongo) database and [Meillisearch](https://github.com/meilisearch/meilisearch) for search. It's exposed on http://localhost:3080/.
|
* [LibreChat](https://github.com/danny-avila/LibreChat) is a ChatGPT clone with support for multiple AI endpoints. It's deployed alongside a [MongoDB](https://github.com/mongodb/mongo) database and [Meillisearch](https://github.com/meilisearch/meilisearch) for search. It's exposed on http://localhost:3080/.
|
||||||
* [LiteLLM](https://github.com/BerriAI/litellm) is an OpenAI-like API. It is exposed on http://localhost:8000/ without any authentication by default.
|
* [LiteLLM](https://github.com/BerriAI/litellm) is an OpenAI-like API. It is exposed on http://localhost:8000/ without any authentication by default.
|
||||||
* [Ollama](https://github.com/ollama/ollama) manages and serve the local models.
|
* [Ollama](https://github.com/ollama/ollama) manages and serve the local models.
|
||||||
|
|
||||||
## Alternatives
|
|
||||||
|
|
||||||
Check out [LM Studio](https://lmstudio.ai/) for a more integrated, but non web-based alternative!
|
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,6 @@ services:
|
||||||
command: --config /config.yaml
|
command: --config /config.yaml
|
||||||
ports:
|
ports:
|
||||||
- 8000:8000
|
- 8000:8000
|
||||||
env_file:
|
|
||||||
- .env
|
|
||||||
environment:
|
|
||||||
- HOST=0.0.0.0
|
|
||||||
- PORT=8000
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./litellm/config.yaml:/config.yaml:ro
|
- ./litellm/config.yaml:/config.yaml:ro
|
||||||
|
|
||||||
|
@ -38,8 +33,6 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- librechat_mongodb_data:/data/db
|
- librechat_mongodb_data:/data/db
|
||||||
command: mongod --noauth
|
command: mongod --noauth
|
||||||
env_file:
|
|
||||||
- .env
|
|
||||||
meilisearch:
|
meilisearch:
|
||||||
image: getmeili/meilisearch:v1.5
|
image: getmeili/meilisearch:v1.5
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
@ -47,8 +40,6 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- MEILI_HOST=http://meilisearch:7700
|
- MEILI_HOST=http://meilisearch:7700
|
||||||
- MEILI_NO_ANALYTICS=true
|
- MEILI_NO_ANALYTICS=true
|
||||||
env_file:
|
|
||||||
- .env
|
|
||||||
volumes:
|
volumes:
|
||||||
- librechat_meilisearch_data:/meili_data
|
- librechat_meilisearch_data:/meili_data
|
||||||
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
include:
|
|
||||||
- docker-compose.base.yml
|
|
||||||
|
|
||||||
services:
|
|
||||||
# Begin Ollama service
|
|
||||||
ollama:
|
|
||||||
image: ollama/ollama:0.1.23
|
|
||||||
restart: unless-stopped
|
|
||||||
entrypoint: /bootstrap.sh
|
|
||||||
command: mistral
|
|
||||||
env_file:
|
|
||||||
- .env
|
|
||||||
ports:
|
|
||||||
- 11434:11434
|
|
||||||
volumes:
|
|
||||||
- ./ollama/bootstrap.sh:/bootstrap.sh:ro
|
|
||||||
- ./ollama:/root/.ollama
|
|
|
@ -7,12 +7,12 @@ endpoints:
|
||||||
apiKey: "noUse"
|
apiKey: "noUse"
|
||||||
baseURL: "http://litellm:8000"
|
baseURL: "http://litellm:8000"
|
||||||
models:
|
models:
|
||||||
default: ["mistral"]
|
default: ["mistral-7b"]
|
||||||
fetch: true
|
fetch: true
|
||||||
titleConvo: true
|
titleConvo: true
|
||||||
titleModel: "mistral"
|
titleModel: "mistral-7b"
|
||||||
summarize: true
|
summarize: true
|
||||||
summaryModel: "mistral"
|
summaryModel: "mistral-7b"
|
||||||
forcePrompt: false
|
forcePrompt: false
|
||||||
modelDisplayLabel: "Ollama"
|
modelDisplayLabel: "Ollama"
|
||||||
# addParams:
|
# addParams:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
model_list:
|
model_list:
|
||||||
- model_name: mistral
|
- model_name: mistral-7b
|
||||||
litellm_params:
|
litellm_params:
|
||||||
model: ollama/mistral
|
model: ollama/mistral
|
||||||
api_base: http://ollama:11434
|
api_base: http://ollama:11434
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
#!/bin/bash -x
|
#!/bin/bash -x
|
||||||
|
|
||||||
|
# Ollama has trouble handling HTTP_PROXY
|
||||||
|
# https://github.com/ollama/ollama/issues/2168
|
||||||
|
unset HTTP_PROXY
|
||||||
|
unset http_proxy
|
||||||
|
|
||||||
ollama serve &
|
ollama serve &
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
Reference in New Issue