-
Notifications
You must be signed in to change notification settings - Fork 109
fix(lightspeed): stop hardcoding vector_store_ids to product docs only #3626
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@red-hat-developer-hub/backstage-plugin-lightspeed-backend': patch | ||
| --- | ||
|
|
||
| Removed hardcoded vector_store_ids override to enable BYOK RAG sources |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -134,8 +134,6 @@ export async function createRouter( | |
| lightspeedCoreBaseUrl, | ||
| logger, | ||
| ); | ||
| let lightspeed_vector_store_id: string = ''; | ||
|
|
||
| // Parse admin-configured MCP servers from app-config. | ||
| // Only name is required; token is optional (users can provide their own via the UI). | ||
| // URLs come from LCS (GET /v1/mcp-servers), not from app-config. | ||
|
|
@@ -601,19 +599,6 @@ export async function createRouter( | |
|
|
||
| logger.info(`/v1/query receives call from user: ${userEntityRef}`); | ||
|
|
||
| // get the vector store id for the rhdh-product-docs vector store | ||
| if (lightspeed_vector_store_id === '') { | ||
| const vectorStores = await vectorStoresOperator.vectorStores.list(); | ||
| lightspeed_vector_store_id = | ||
| vectorStores.data.find((v: any) => | ||
| v.name.startsWith('rhdh-product-docs'), | ||
| )?.id || ''; | ||
| } | ||
|
|
||
| if (lightspeed_vector_store_id !== '') { | ||
| request.body.vector_store_ids = [lightspeed_vector_store_id]; | ||
| } | ||
|
|
||
|
Comment on lines
-604
to
-616
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @maysunfaisal @rajin-kichannagari Do we still need to get the vector store ID from the vector stores this way if the platform engineer does not use BYOK? If so, we might want to add some additional logic here to determine if this is a BYOK situation or not.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm pretty sure we still need this explicit vector_store setup or otherwise Developer LIghtspeed tool will also query from Notebooks vector_store.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @JslYoon is that why it was introduced in the first place? We also need to remove this hardcoded vector store dependency because OKP also cannot function if we are calling LCORE with hardcoded vector store names 🤔 |
||
| const userQueryParam = `user_id=${encodeURIComponent(userEntityRef)}`; | ||
| request.body.media_type = 'application/json'; // set media_type to receive start and end event | ||
| // if system_prompt is defined in lightspeed config | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Claude,