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.

Signed-off-by: Keming <[email protected]>
@kemingy kemingy requested a review from Copilot July 11, 2025 08:44

This comment was marked as outdated.

Signed-off-by: Keming <[email protected]>
@kemingy kemingy requested a review from Copilot July 11, 2025 08:50
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 adds support for Jina AI embeddings by introducing new provider and model classes, integrating them into the existing pipeline, and defining a rate limit constant.

  • Adds JINA_EMBEDDING_RPS constant and removes redundant Self fallbacks in utils and spec modules.
  • Introduces JinaEmbeddingProvider, JinaDenseEmbedding, and corresponding msgspec request/response types.
  • Updates pipeline registration, model exports, error definitions, and documentation to include Jina.

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
vechord/utils.py Added JINA_EMBEDDING_RPS constant; unified Self import.
vechord/typing.py New module exporting Self.
vechord/spec.py Replaced inline Self fallback with import.
vechord/provider.py Added JinaEmbeddingProvider and updated imports.
vechord/pipeline.py Registered JinaDenseEmbedding in embedding factory.
vechord/model/jina.py Defined Jina-specific msgspec structs and response handling.
vechord/model/gemini.py Added return type hints and clarified docstrings on class methods.
vechord/model/init.py Exposed JinaEmbeddingRequest and JinaEmbeddingResponse.
vechord/errors.py Introduced UnexpectedResponseError.
vechord/embedding.py Added JinaDenseEmbedding implementation and imports.
docs/source/utils.md Documented JinaDenseEmbedding and fixed Co-here reranker description.
Comments suppressed due to low confidence (4)

docs/source/utils.md:30

  • The indentation for the CohereReranker bullet is misaligned. Align it with the other list items to ensure correct rendering in the docs.
    - {py:class}`~vechord.rerank.CohereReranker`: Cohere reranker

vechord/provider.py:110

  • Add unit tests to cover JinaEmbeddingProvider.query (success and error paths) to ensure expected behavior and proper error handling.
class JinaEmbeddingProvider(BaseProvider):

vechord/model/jina.py:56

  • [nitpick] The error message 'empty embedding data' is quite generic. Consider including context (e.g., 'Jina embedding response contains no data') to aid in debugging.
            raise UnexpectedResponseError("empty embedding data")

vechord/model/gemini.py:135

  • The docstring says 'first embedding' but this method returns the full embedding array. Update it to accurately describe the behavior (e.g., 'Get the embedding as a numpy array').
        """Get the first embedding as a numpy array."""

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Keming <[email protected]>
@kemingy kemingy merged commit 5569a7e into tensorchord:main Jul 11, 2025
7 checks passed
@kemingy kemingy deleted the jina_emb branch July 11, 2025 08:54
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