IDinsight / ask-a-question

Trustworthy question-answering AI plugin for chatbots in the social sector with advanced content performance analysis.
https://ask-a-question.com
BSD 3-Clause "New" or "Revised" License
27 stars 4 forks source link

[128] - Modify voice-search endpoint for chatflows #409

Closed MustafaAkolawala closed 2 weeks ago

MustafaAkolawala commented 3 weeks ago

Reviewer: @amiraliemami Estimate: 10 mins


Ticket

Fixes: No associated ticket

Description

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

How has this been tested?

Docker-compose Swagger UI Unit tests

How to test this?

  1. Initialize the development environment by executing docker compose -f docker-compose.yml -f docker-compose.dev.yml -p aaq-stack watch
  2. 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.
  3. Examine the output by accessing the generated URL provided in the response

Checklist

Fill with x for completed.