This pull request refactors the voice-search endpoint to accept a URL instead of a file, ensuring consistency with all chatflow managers. Additionally, it enhances the error handling mechanism of the voice-search endpoint.
Goal
The primary aim is to align the voice-search endpoint with the chatflow managers integration by transitioning from direct file acceptance to URL-based input. Furthermore, this update improves error handling to provide concise, informative error messages rather than verbose stack traces.
Changes
The voice-search endpoint now requires a valid URL pointing to the stored voice file, replacing the previous direct file upload method.
Error handling has been overhauled to generate more user-friendly and actionable error messages, eliminating the display of full error stack traces.
How has this been tested?
Docker-compose
Swagger UI
Unit tests
How to test this?
Initialize the development environment by executing docker compose -f docker-compose.yml -f docker-compose.dev.yml -p aaq-stack watch
Validate the functionality by submitting a request to the endpoint, providing a URL to an audio file stored in either Google Cloud Storage (GCS) or Amazon S3.
Examine the output by accessing the generated URL provided in the response
Checklist
Fill with x for completed.
[x] My code follows the style guidelines of this project
[x] I have reviewed my own code to ensure good quality
[x] I have tested the functionality of my code to ensure it works as intended
Reviewer: @amiraliemami Estimate: 10 mins
Ticket
Fixes: No associated ticket
Description
This pull request refactors the
voice-search
endpoint to accept aURL
instead of a file, ensuring consistency with allchatflow managers
. Additionally, it enhances the error handling mechanism of the voice-search endpoint.Goal
The primary aim is to align the
voice-search
endpoint with the chatflow managers integration by transitioning from direct file acceptance to URL-based input. Furthermore, this update improves error handling to provide concise, informative error messages rather than verbose stack traces.Changes
How has this been tested?
Docker-compose Swagger UI Unit tests
How to test this?
docker compose -f docker-compose.yml -f docker-compose.dev.yml -p aaq-stack watch
URL
to an audio file stored in eitherGoogle Cloud Storage
(GCS) orAmazon S3
.URL
provided in the responseChecklist
Fill with
x
for completed.