[codex] Support Voyage contextual embeddings in pipelines - #572
[codex] Support Voyage contextual embeddings in pipelines#572williambarberjr wants to merge 5 commits into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request transitions VoyageAI embeddings to the catsu provider and introduces support for contextualized models, specifically voyage-context-3. It adds embed_documents functionality to preserve document boundaries and updates the TurbopufferHandshake and Pipeline to support document-aware writing. Feedback suggests removing a redundant warning for the truncation parameter in VoyageAIEmbeddings and optimizing the hasattr check for contextualized embedding support in CatsuEmbeddings by moving it to the initialization phase.
| if truncation is not True: | ||
| warnings.warn( | ||
| "The `truncation` parameter is not supported for contextualized " | ||
| "Voyage embeddings and will be ignored.", | ||
| DeprecationWarning, | ||
| stacklevel=2, | ||
| ) |
There was a problem hiding this comment.
This specific warning for contextualized models is redundant. A more general warning for the truncation parameter is already issued at line 112 for all models in this class. Since VoyageAIEmbeddings ignores the truncation parameter for all models (as it is not supported by the underlying CatsuEmbeddings), the general warning is sufficient and covers this case.
| if not hasattr(self.client, "contextualized_embed"): | ||
| raise RuntimeError( | ||
| "The installed catsu package does not support contextualized embeddings. " | ||
| "Install a catsu version with `contextualized_embed` support.", | ||
| ) |
There was a problem hiding this comment.
Summary
voyage-context-3support throughVoyageAIEmbeddings, backed by CatsuCatsuEmbeddingsfor contextual modelswrite_documents, and make Turbopuffer preserve document boundaries before embedding chunksDependency
catsuversionTest plan
Notes