OpenRAG is a comprehensive, single package Retrieval-Augmented Generation platform built on Langflow, Docling, and Opensearch.
Python
pass index name at runtime to langflow (#2120)
Lucas Oliveira9f13f363120d
diff --git a/src/utils/langflow_headers.py b/src/utils/langflow_headers.pyindex f764f4175..bbeddd115 100644--- a/src/utils/langflow_headers.py+++ b/src/utils/langflow_headers.py@@ -97,14 +97,18 @@ async def add_provider_credentials_to_headers(ollama_endpoint = transform_localhost_url(config.providers.ollama.endpoint)headers["X-LANGFLOW-GLOBAL-VAR-OLLAMA_BASE_URL"] = str(ollama_endpoint)- # Inject OpenSearch URL so Langflow flows always use the correct endpoint- from config.settings import LANGFLOW_OPENSEARCH_HOST, LANGFLOW_OPENSEARCH_PORT+ # Inject OpenSearch URL and index name so Langflow flows always use the correct endpoint+ from config.settings import LANGFLOW_OPENSEARCH_HOST, LANGFLOW_OPENSEARCH_PORT, get_index_nameif LANGFLOW_OPENSEARCH_HOST and LANGFLOW_OPENSEARCH_PORT:headers["X-LANGFLOW-GLOBAL-VAR-OPENSEARCH_URL"] = (f"https://{LANGFLOW_OPENSEARCH_HOST}:{LANGFLOW_OPENSEARCH_PORT}")+ index_name = get_index_name()+ if index_name:+ headers["X-LANGFLOW-GLOBAL-VAR-OPENSEARCH_INDEX_NAME"] = index_name+# IBM mode: inject OpenSearch Basic credentials as separate global varsfrom config.settings import IBM_AUTH_ENABLED