Support separate embedding base URL

This commit is contained in:
Dustin Persek 2026-07-05 22:33:09 -04:00
parent aa7388f2f7
commit 6fafedca6a
8 changed files with 160 additions and 6 deletions

View file

@ -39,6 +39,7 @@ All configuration lives in a single `docker/.env` file (or `surfsense/.env` if y
| `AUTH_TYPE` | Authentication method: `LOCAL` (email/password) or `GOOGLE` (OAuth) | `LOCAL` |
| `ETL_SERVICE` | Document parsing: `DOCLING` (local), `UNSTRUCTURED`, or `LLAMACLOUD` | `DOCLING` |
| `EMBEDDING_MODEL` | Embedding model for vector search | `sentence-transformers/all-MiniLM-L6-v2` |
| `EMBEDDING_BASE_URL` | Optional separate endpoint for Chonkie/LiteLLM embedding models. Use with values like `EMBEDDING_MODEL=litellm://ollama/nomic-embed-text`. `OLLAMA_EMBEDDING_BASE_URL` is also accepted as an Ollama-specific fallback. | *(empty)* |
| `TTS_SERVICE` | Text-to-speech provider for podcasts | `local/kokoro` |
| `STT_SERVICE` | Speech-to-text provider for audio files | `local/base` |
| `REGISTRATION_ENABLED` | Allow new user registrations | `TRUE` |

View file

@ -50,6 +50,23 @@ http://<host>:11434
Replace `<host>` with the LAN IP or domain for that machine.
## Embeddings on a Separate Ollama Server
Search-space model connections configure chat and completion models. The global
embedding model is configured in the backend environment.
Use Chonkie's LiteLLM embedding provider when embeddings run on Ollama:
```dotenv
EMBEDDING_MODEL=litellm://ollama/nomic-embed-text
EMBEDDING_BASE_URL=http://host.docker.internal:11434
```
If chat and embeddings run on different Ollama instances, keep the chat model
connection pointed at the chat server and set `EMBEDDING_BASE_URL` to the
embedding server. `OLLAMA_EMBEDDING_BASE_URL` is also supported as an
Ollama-specific fallback when `EMBEDDING_BASE_URL` is not set.
## Add the Connection
1. Open Search Space Settings.

View file

@ -85,6 +85,7 @@ Edit the `.env` file and set the following variables:
| GOOGLE_OAUTH_CLIENT_ID | (Optional) Client ID from Google Cloud Console (required if AUTH_TYPE=GOOGLE) |
| GOOGLE_OAUTH_CLIENT_SECRET | (Optional) Client secret from Google Cloud Console (required if AUTH_TYPE=GOOGLE) |
| EMBEDDING_MODEL | Name of the embedding model (e.g., `sentence-transformers/all-MiniLM-L6-v2`, `openai://text-embedding-ada-002`) |
| EMBEDDING_BASE_URL | (Optional) Separate endpoint for Chonkie/LiteLLM embedding models, such as `http://localhost:11434` with `EMBEDDING_MODEL=litellm://ollama/nomic-embed-text`. `OLLAMA_EMBEDDING_BASE_URL` is also supported as an Ollama-specific fallback. |
| RERANKERS_ENABLED | (Optional) Enable or disable document reranking for improved search results (e.g., `TRUE` or `FALSE`, default: `FALSE`) |
| RERANKERS_MODEL_NAME | Name of the reranker model (e.g., `ms-marco-MiniLM-L-12-v2`) (required if RERANKERS_ENABLED=TRUE) |
| RERANKERS_MODEL_TYPE | Type of reranker model (e.g., `flashrank`) (required if RERANKERS_ENABLED=TRUE) |