Skip to content

Conversation

@michaelfeil
Copy link
Owner

Related Issue

Checklist

  • I have read the CONTRIBUTING guidelines.
  • I have added tests to cover my changes.
  • I have updated the documentation (docs folder) accordingly.

Additional Notes

Add any other context about the PR here.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR refactors the codebase to support Pydantic 2.x and improves handling of multimodal inputs, while adding support for new embedding models like nomic-ai/nomic-embed-text-v1.5.

  • Removed legacy convert.py and its helper functions in favor of direct method calls on response classes
  • Changed image/audio input types from specific array types to Union[str, bytes] in sync_engine.py and related files
  • Updated FastAPI models to require Pydantic 2.x and removed backwards compatibility layer
  • Fixed data URI handling in infinity_server.py by properly accessing the 'data' attribute
  • Added new model integrations including nomic-ai/nomic-embed-text-v1.5 and updated Poetry requirements to 1.8.1

7 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines 103 to 105
"""the goal of this code is to write an as simple as possible server
that can we rebuild by any other p
"""
Copy link
Contributor

Choose a reason for hiding this comment

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

style: incomplete docstring comment - 'p' appears to be cut off

self,
*,
images: list[str],
images: Union[str, bytes],
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Type hint Union[str, bytes] doesn't match docstring example which shows a list being passed. Should be Union[list[str], list[bytes]] or similar.

self,
*,
audios: list[str],
audios: Union[str, bytes],
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Type hint Union[str, bytes] doesn't match docstring example which shows a list being passed. Should be Union[list[str], list[bytes]] or similar.

@codecov-commenter
Copy link

codecov-commenter commented Nov 15, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.

Project coverage is 79.60%. Comparing base (764917a) to head (a2c4733).

Files with missing lines Patch % Lines
libs/infinity_emb/infinity_emb/infinity_server.py 50.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #465      +/-   ##
==========================================
+ Coverage   79.04%   79.60%   +0.56%     
==========================================
  Files          42       41       -1     
  Lines        3408     3379      -29     
==========================================
- Hits         2694     2690       -4     
+ Misses        714      689      -25     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@michaelfeil michaelfeil merged commit 8ac0b3c into main Nov 16, 2024
36 checks passed
@michaelfeil michaelfeil deleted the refactor-pydantic-2 branch November 16, 2024 02:24
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.

3 participants