-
Notifications
You must be signed in to change notification settings - Fork 122
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
Audio: OpenAI API #377
Audio: OpenAI API #377
Conversation
There was a problem hiding this 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 adds audio embedding support to the Infinity API, updates the OpenAPI specification, and introduces asynchronous operations for image and audio processing to improve performance.
- Added '/embeddings_audio' endpoint in
infinity_server.py
for audio embedding, but implementation has issues needing attention - Replaced 'requests' with 'aiohttp' in
_optional_imports.py
for asynchronous HTTP requests - Introduced
AudioEmbeddingInput
class inpymodels.py
, inheriting fromImageEmbeddingInput
- Updated
resolve_images
andresolve_audios
functions inutils.py
to use asynchronous operations withaiohttp
andasyncio.gather()
- Modified
BatchHandler
inbatch_handler.py
to directly awaitresolve_images
andresolve_audios
, removingasyncio.to_thread
6 file(s) reviewed, 5 comment(s)
Edit PR Review Bot Settings
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #377 +/- ##
==========================================
- Coverage 78.24% 77.78% -0.47%
==========================================
Files 37 37
Lines 2781 2804 +23
==========================================
+ Hits 2176 2181 +5
- Misses 605 623 +18 ☔ View full report in Codecov by Sentry. |
OpenAI does not have image embeddings, therefore using an API similar to embeddings.