mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #11466] [MERGED] fix: opensearch environment variables fix #9536
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/11466
Author: @captn-hook
Created: 3/9/2025
Status: ✅ Merged
Merged: 3/9/2025
Merged by: @tjbck
Base:
dev← Head:dev📝 Commits (6)
fc056b1Update bug_report.yaml165e861Create config.yamlc1d2e0drefaca75f827Update bug_report.yaml084e2caUpdate config.py to correctly handle environment strings4c98508Merge pull request #3 from open-webui/dev📊 Changes
1 file changed (+2 additions, -2 deletions)
View changed files
📝
backend/open_webui/config.py(+2 -2)📄 Description
Pull Request Checklist
https://github.com/open-webui/open-webui/discussions/11431
Changelog Entry
as per this thread in the discord
https://discord.com/channels/1170866489302188073/1347727886001635338
opensearch environment variables are loaded as strings instead of bools,
modified according to other examples in the file backend/open_webui/config.py
in backend/open_webui/retrieval/vector/dbs/opensearch.py,
class OpenSearchClient:
def init(self):
self.index_prefix = "open_webui"
self.client = OpenSearch(
hosts=[OPENSEARCH_URI],
use_ssl=OPENSEARCH_SSL,
verify_certs=OPENSEARCH_CERT_VERIFY,
http_auth=(OPENSEARCH_USERNAME, OPENSEARCH_PASSWORD),
)
But this is a Python bool, not a string.
In backend/open_webui/config.py, we define it here:
OPENSEARCH_SSL = os.environ.get("OPENSEARCH_SSL", True)
other variables are loaded like
OPENSEARCH_SSL = os.environ.get("OPENSEARCH_SSL", "true").lower() == "true"
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.