forked from opea-project/GenAIComps
-
Notifications
You must be signed in to change notification settings - Fork 0
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 query functionality to multimodal backend #8
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Melanie Buehler <[email protected]>
Signed-off-by: Melanie Buehler <[email protected]>
Signed-off-by: Melanie Buehler <[email protected]>
Signed-off-by: okhleif-IL <[email protected]>
Signed-off-by: Melanie Buehler <[email protected]>
Signed-off-by: dmsuehir <[email protected]>
Signed-off-by: Melanie Buehler <[email protected]>
Signed-off-by: okhleif-IL <[email protected]>
Signed-off-by: Melanie Buehler <[email protected]>
Signed-off-by: Melanie Buehler <[email protected]>
…hbuehler/GenAIComps into melanie/combined_image_video_ingestion
…estion Image ingestion improvements
…omps into melanie/mm-rag-enhanced
…omps into dina/audio-query
Signed-off-by: okhleif-IL <[email protected]>
* Add support for audio files multimodal data ingestion Signed-off-by: dmsuehir <[email protected]> * Update function name Signed-off-by: dmsuehir <[email protected]> --------- Signed-off-by: dmsuehir <[email protected]>
Signed-off-by: Melanie Buehler <[email protected]>
Signed-off-by: Melanie Buehler <[email protected]>
Signed-off-by: Melanie Buehler <[email protected]>
…omps into dina/audio-query
Signed-off-by: okhleif-IL <[email protected]>
Signed-off-by: okhleif-IL <[email protected]>
Signed-off-by: okhleif-IL <[email protected]>
Signed-off-by: Melanie Buehler <[email protected]>
Signed-off-by: okhleif-IL <[email protected]>
Signed-off-by: okhleif-IL <[email protected]>
Signed-off-by: okhleif-IL <[email protected]>
Signed-off-by: okhleif-IL <[email protected]>
Signed-off-by: okhleif-IL <[email protected]>
Signed-off-by: okhleif-IL <[email protected]>
Signed-off-by: okhleif-IL <[email protected]>
Signed-off-by: okhleif-IL <[email protected]>
Signed-off-by: okhleif-IL <[email protected]>
Signed-off-by: okhleif-IL <[email protected]>
Signed-off-by: okhleif-IL <[email protected]>
Signed-off-by: okhleif-IL <[email protected]>
Signed-off-by: okhleif-IL <[email protected]>
mhbuehler
requested changes
Nov 22, 2024
Signed-off-by: okhleif-IL <[email protected]>
mhbuehler
requested changes
Nov 22, 2024
Signed-off-by: okhleif-IL <[email protected]>
mhbuehler
approved these changes
Nov 22, 2024
dmsuehir
requested changes
Nov 23, 2024
Signed-off-by: okhleif-IL <[email protected]>
Signed-off-by: okhleif-IL <[email protected]>
Signed-off-by: okhleif-IL <[email protected]>
Signed-off-by: okhleif-IL <[email protected]>
dmsuehir
requested changes
Dec 2, 2024
Signed-off-by: okhleif-IL <[email protected]>
dmsuehir
approved these changes
Dec 2, 2024
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.
LGTM, thanks
dmsuehir
added a commit
that referenced
this pull request
Dec 16, 2024
* Backend enhancements for image query capabilities for MultimodalQnA * Fix model name var Signed-off-by: dmsuehir <[email protected]> * Remove space at end of prompt Signed-off-by: dmsuehir <[email protected]> * Add env var for the max number of images sent to the LVM Signed-off-by: dmsuehir <[email protected]> * README update for the MAX_IMAGES env var Signed-off-by: dmsuehir <[email protected]> * Remove prints Signed-off-by: dmsuehir <[email protected]> * Audio query functionality to multimodal backend (#8) Signed-off-by: okhleif-IL <[email protected]> * added in audio dict creation Signed-off-by: okhleif-IL <[email protected]> * separated audio from prompt Signed-off-by: okhleif-IL <[email protected]> * added ASR endpoint Signed-off-by: okhleif-IL <[email protected]> * removed ASR endpoints from mm embedding Signed-off-by: okhleif-IL <[email protected]> * edited return logic, fixed function call Signed-off-by: okhleif-IL <[email protected]> * added megaservice to elif Signed-off-by: okhleif-IL <[email protected]> * reworked helper func Signed-off-by: okhleif-IL <[email protected]> * Append audio to prompt Signed-off-by: okhleif-IL <[email protected]> * Reworked handle messages, added metadata Signed-off-by: okhleif-IL <[email protected]> * Moved dictionary logic to right place Signed-off-by: okhleif-IL <[email protected]> * changed logic to rely on message len Signed-off-by: okhleif-IL <[email protected]> * list --> empty str Signed-off-by: okhleif-IL <[email protected]> --------- Signed-off-by: Melanie Buehler <[email protected]> Signed-off-by: okhleif-IL <[email protected]> Signed-off-by: dmsuehir <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixed role bug where i never was > 0 Signed-off-by: okhleif-IL <[email protected]> * Fix after merge Signed-off-by: dmsuehir <[email protected]> * removed whitespace Signed-off-by: okhleif-IL <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix call to get role labels Signed-off-by: dmsuehir <[email protected]> * Gateway test updates images within the conversation Signed-off-by: dmsuehir <[email protected]> * Adds unit test coverage for audio query Signed-off-by: Melanie Buehler <[email protected]> * Update test to check the returned b64 types Signed-off-by: dmsuehir <[email protected]> * Update test since we don't expect images from the assistant Signed-off-by: dmsuehir <[email protected]> * Port number fix Signed-off-by: Melanie Buehler <[email protected]> * Formatting Signed-off-by: Melanie Buehler <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fixed place where port number is set Signed-off-by: Melanie Buehler <[email protected]> * Remove old comment and added more accurate description Signed-off-by: dmsuehir <[email protected]> * add comment in code about MAX_IMAGES Signed-off-by: dmsuehir <[email protected]> * Add Gaudi support for image query Signed-off-by: dmsuehir <[email protected]> * Fix to pass the retrieved image last Signed-off-by: dmsuehir <[email protected]> * Revert out gateway and gateway test code, due to its move to GenAIExamples Signed-off-by: dmsuehir <[email protected]> * Fix retriever test for checking for b64_img_str in the result Signed-off-by: dmsuehir <[email protected]> --------- Signed-off-by: dmsuehir <[email protected]> Signed-off-by: Melanie Buehler <[email protected]> Signed-off-by: okhleif-IL <[email protected]> Co-authored-by: Omar Khleif <[email protected]> Co-authored-by: Melanie Hart Buehler <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Abolfazl Shahbazi <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR enables audio as a query in the backend, where the expected input to the gateway is a b64 string.
Issues
Part of RFC --> https://github.com/opea-project/docs/blob/main/community/rfcs/24-10-02-GenAIExamples-001-Image_and_Audio_Support_in_MultimodalQnA.md
Type of change
List the type of change like below. Please delete options that are not relevant.
Dependencies
N/A
Tests
Verify with curl command:
curl http://${host_ip}:8888/v1/multimodalqna -H "Content-Type: application/json" -d '{"messages": [{"role": "user", "content": [{"type": "audio", "audio": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"}]}]}'
curl http://${host_ip}:8888/v1/multimodalqna -H "Content-Type: application/json" -d '{"messages": [{"role": "user", "content": [{"type": "audio", "audio": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA, "}]}, {"role": "assistant", "content": "How may I help?"}, {"role": "user", "content": [{"type": "text", "text": "what pronoun did I tell you?"}]}]}
Need to add automated test.