Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kemingy
Copy link
Member

@kemingy kemingy commented Jul 11, 2025

No description provided.

@kemingy kemingy requested a review from Copilot July 11, 2025 11:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the Voyage client by extracting common logic into a new provider class and centralizing request/response handling.

  • Adds VoyageEmbeddingProvider to handle HTTP calls and rate limiting
  • Introduces factory methods (from_text, build) and a get_emb helper in the voyage models
  • Updates embedding classes to use the new provider and model APIs

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
vechord/provider.py Added VoyageEmbeddingProvider for embedding HTTP calls
vechord/model/voyage.py Defined VoyageEmbeddingRequest/Response, helpers, and factories
vechord/model/jina.py Updated JinaEmbeddingRequest.from_text signature to accept model
vechord/embedding.py Refactored embedding classes to use VoyageEmbeddingProvider and new model APIs
Comments suppressed due to low confidence (4)

vechord/model/voyage.py:26

  • Consider adding unit tests for get_emb, covering both list-based embeddings and buffer-based embeddings, and the error path when data is empty.
    def get_emb(self) -> np.ndarray:

vechord/model/voyage.py:49

  • Add tests for VoyageEmbeddingRequest.from_text to verify that the factory sets all fields correctly, including input_type, model, and output_dimension.
    def from_text(

vechord/model/voyage.py:84

  • Add tests for VoyageMultiModalEmbeddingRequest.build to ensure it correctly constructs inputs for text, image, and URL combinations.
    def build(

vechord/provider.py:162

  • The query method on VoyageEmbeddingProvider is typed to accept GeminiEmbeddingRequest but should use VoyageEmbeddingRequest. Please update the parameter type and import VoyageEmbeddingRequest accordingly.
    async def query(self, req: GeminiEmbeddingRequest) -> VoyageEmbeddingResponse:

@kemingy kemingy merged commit e39937c into tensorchord:main Jul 11, 2025
7 checks passed
@kemingy kemingy deleted the refact_voyage branch July 11, 2025 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant