Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed openai broad multimodal compat #395

Merged
merged 7 commits into from
Oct 5, 2024

Conversation

michaelfeil
Copy link
Owner

@michaelfeil michaelfeil commented Oct 4, 2024

Closes #394

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 pull request introduces significant changes to support multimodal embeddings (text, image, and audio) through a unified /embeddings endpoint in the Infinity API.

  • Deprecated separate /embeddings_image and /embeddings_audio endpoints in favor of the unified /embeddings endpoint with infinity_extra_modality parameter
  • Added new OpenAIEmbeddingInputAudio, OpenAIEmbeddingInputImage, and OpenAIEmbeddingInputText models in libs/client_infinity/infinity_client/infinity_client/models/
  • Updated infinity_server.py to handle multimodal inputs and improve error handling
  • Introduced comprehensive tests in test_openapi_client_compat.py for OpenAI-compatible embedding API across all modalities
  • Updated OpenAPI specification in docs/assets/openapi.json to reflect new multimodal embedding capabilities

27 file(s) reviewed, 8 comment(s)
Edit PR Review Bot Settings

@codecov-commenter
Copy link

codecov-commenter commented Oct 4, 2024

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

Codecov Report

Attention: Patch coverage is 77.04918% with 14 lines in your changes missing coverage. Please review.

Project coverage is 78.55%. Comparing base (3de8ea7) to head (a23810b).

Files with missing lines Patch % Lines
...inity_emb/infinity_emb/fastapi_schemas/pymodels.py 68.96% 9 Missing ⚠️
libs/infinity_emb/infinity_emb/infinity_server.py 88.46% 3 Missing ⚠️
...finity_emb/infinity_emb/transformer/audio/utils.py 0.00% 2 Missing ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #395      +/-   ##
==========================================
- Coverage   78.67%   78.55%   -0.12%     
==========================================
  Files          39       39              
  Lines        2963     3008      +45     
==========================================
+ Hits         2331     2363      +32     
- Misses        632      645      +13     

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

@michaelfeil michaelfeil force-pushed the embed-openai-broad-multimodal-compat branch from ea35e76 to a23810b Compare October 4, 2024 21:34
@michaelfeil michaelfeil merged commit 2ff39c6 into main Oct 5, 2024
36 checks passed
@michaelfeil michaelfeil deleted the embed-openai-broad-multimodal-compat branch October 5, 2024 06:33
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.

Text / Audio / Image embeddings behind the Post /embeddings via discrimminated union and optional extra fields
2 participants