feat: Adding support for get, update, delete for Chunks in Vector Stores API #3022
+1,819
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR adds support for for Chunks in the new OpenAI Vector Stores API. In particular, it adds the following APIs:
It's worth noting that these APIs aren't actually available from OpenAI but they are consistent with them and are likely what they expose internally (but that's just speculation on my part).
As mentioned in this issue, this is needed for supporting the ingestion of precomputed embeddings, similar to what's available with VectorIO today.
See this example here that is in use at Red Hat: https://github.com/opendatahub-io/rag/tree/main/demos/kfp/docling/pdf-conversion
I enabled the ingestion of precomputed embeddings in #2317, which has been used by a number of our customers via VectorIO.insert(). This would give us feature parity and be consistent with OpenAI's naming conventions.
Other thoughts
I also have a PoC of how this can be exposed in the UI. A screenshot is available below:
Closes #3021
Test Plan
Unit tests added.