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

Skip to content

Conversation

@kemingy
Copy link
Member

@kemingy kemingy commented Jul 8, 2025

No description provided.

@kemingy kemingy requested a review from Copilot July 8, 2025 03:51

This comment was marked as outdated.

@kemingy kemingy requested a review from Copilot July 8, 2025 09:05

This comment was marked as outdated.

@kemingy kemingy requested a review from Copilot July 8, 2025 09:20
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 how Gemini requests and responses are constructed by adopting msgspec structs and streamlines registry return-type handling, while also introducing InputType support for different data formats.

  • Added get_iterator_type to unwrap nested iterable return types in VechordRegistry
  • Replaced ad-hoc JSON dicts with msgspec.json.Encoder/Decoder calls across extract, evaluate, entity, chunk, and augment modules
  • Introduced InputType enum and updated run_dynamic_pipeline to handle TEXT, PDF, and IMAGE inputs

Reviewed Changes

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

Show a summary per file
File Description
vechord/registry.py Added iterator-type unwrapping helper for registry decorator
vechord/pipeline.py Introduced InputType and improved OCR branching logic
vechord/model/web.py Added InputType enum and changed RunAck.uid to UUID
vechord/model/gemini.py New msgspec-based Gemini API structs and helpers
vechord/extract.py Refactored GeminiExtractor to use generic query method
vechord/log.py Lowered default log level from DEBUG to INFO
Comments suppressed due to low confidence (2)

vechord/pipeline.py:140

  • The new error branch for missing OCR providers on PDF/IMAGE inputs isn't covered by tests. Add tests to verify that a ValueError is raised when input_type is PDF or IMAGE but no OCR step is provided.
                raise ValueError(

vechord/model/web.py:40

  • [nitpick] Changing uid from str to UUID alters the API contract. Consider updating docstrings or migration notes so consumers know to handle a UUID object.
    uid: UUID

Signed-off-by: Keming <[email protected]>
@kemingy kemingy merged commit 0a76708 into tensorchord:main Jul 8, 2025
4 checks passed
@kemingy kemingy deleted the gemini_struct branch July 8, 2025 09:25
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