Skip to content

Commit 9fff282

Browse files
Merge pull request #2630 from syedriko/syedriko-ols-2166
OLS-2166: even in debug mode, OLS server never indicates BYOK indexes are loaded
2 parents 00dea8b + 9f252eb commit 9fff282

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

ols/app/models/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,7 @@ class ReferenceContentIndex(BaseModel):
853853

854854
product_docs_index_path: Optional[FilePath] = None
855855
product_docs_index_id: Optional[str] = None
856+
product_docs_origin: Optional[str] = None
856857

857858
def __init__(self, data: Optional[dict] = None) -> None:
858859
"""Initialize configuration and perform basic validation."""
@@ -861,13 +862,15 @@ def __init__(self, data: Optional[dict] = None) -> None:
861862
return
862863
self.product_docs_index_path = data.get("product_docs_index_path", None)
863864
self.product_docs_index_id = data.get("product_docs_index_id", None)
865+
self.product_docs_origin = data.get("product_docs_origin", None)
864866

865867
def __eq__(self, other: object) -> bool:
866868
"""Compare two objects for equality."""
867869
if isinstance(other, ReferenceContentIndex):
868870
return (
869871
self.product_docs_index_path == other.product_docs_index_path
870872
and self.product_docs_index_id == other.product_docs_index_id
873+
and self.product_docs_origin == other.product_docs_origin
871874
)
872875
return False
873876

ols/src/rag_index/index_loader.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,15 @@ def _load_index(self) -> None:
145145
),
146146
persist_dir=index_config.product_docs_index_path,
147147
)
148-
logger.info("Loading vector index #%d...", i)
148+
logger.info(
149+
"Loading vector index #%d%s...",
150+
i,
151+
(
152+
f" from {index_config.product_docs_origin}"
153+
if index_config.product_docs_origin
154+
else ""
155+
),
156+
)
149157
index = load_index_from_storage(
150158
storage_context=storage_context,
151159
index_id=index_config.product_docs_index_id,

0 commit comments

Comments
 (0)