Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example/llm: Re-evaluate open-webui environment variables #230

Closed
srid opened this issue Jun 14, 2024 · 5 comments
Closed

example/llm: Re-evaluate open-webui environment variables #230

srid opened this issue Jun 14, 2024 · 5 comments
Assignees

Comments

@srid
Copy link
Collaborator

srid commented Jun 14, 2024

{
ENABLE_OLLAMA_API = "True";
OLLAMA_BASE_URL = "http://${host}:${toString port}";
OLLAMA_API_BASE_URL = "http://${host}:${toString port}/api";
WEBUI_AUTH = "False";
DEVICE_TYPE = "cpu";
RAG_EMBEDDING_ENGINE = "ollama";
RAG_EMBEDDING_MODEL = "mxbai-embed-large:latest";
RAG_EMBEDDING_MODEL_AUTO_UPDATE = "True";
RAG_RERANKING_MODEL_AUTO_UPDATE = "True";
};

Keep only environment variables (which were introduced in #227) that are strictly necessary, while leaving the rest commented out.

Consider the implications of DEVICE_TYPE = "cpu"; especially when GPU is enabled.


Our examples should a) "just work", be b) simple and minimal, c) well-documented (liberal use of comments, for example).

@shivaraj-bh
Copy link
Member

We needn’t have to assign DEVICE_TYPE = “cpu” as it is ”cpu” by default, unless explicitly specified.

Also, this ENV doesn’t affect ollama using CPU or not, which will still be managed as documented., but it only affects how the embedding models used to run RAG pipelines are invoked.

@shivaraj-bh
Copy link
Member

ENABLE_OLLAMA_API = "True”; is also redundant as it is true by default. It could probably be a comment so that the users know how to disable it, if they want to.

@shivaraj-bh
Copy link
Member

OLLAMA_BASE_URL = "http://${host}:${toString port}”; is also redundant as it is derived from OLLAMA_API_BASE_URL by default.

@shivaraj-bh
Copy link
Member

shivaraj-bh commented Jun 16, 2024

{
  RAG_EMBEDDING_ENGINE = "ollama"; 
  RAG_EMBEDDING_MODEL = "mxbai-embed-large:latest"; 
}

should be fine, since otherwise Open WebUI will use sentence-transformers to fetch the embedding models, which would require DEVICE_TYPE to choose where the embedding happens. If we rely on ollama instead, we can make use of already documented configuration to use GPU acceleration.

@srid
Copy link
Collaborator Author

srid commented Jun 16, 2024

should be fine, since otherwise Open WebUI will use sentence-transformers to fetch the embedding models, which would require DEVICE_TYPE to choose where the embedding happens. If we rely on ollama instead, we can make use of already documented configuration to use GPU acceleration.

This, verbatim, sounds like a good candidate for a comment on top of these env vars.

The rest can be either commented out or removed.

shivaraj-bh added a commit that referenced this issue Jun 17, 2024
For details, see:
-
#230 (comment)
-
#230 (comment)
-
#230 (comment)
-
#230 (comment)

Additionally introduced `WEBUI_SECRET_KEY`, see why:
#229 (comment)
srid pushed a commit that referenced this issue Jun 17, 2024
For details, see:
-
#230 (comment)
-
#230 (comment)
-
#230 (comment)
-
#230 (comment)

Additionally introduced `WEBUI_SECRET_KEY`, see why:
#229 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants