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

Fix/rm webhooks #290

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Fix/rm webhooks #290

wants to merge 6 commits into from

Conversation

KyrianC
Copy link
Collaborator

@KyrianC KyrianC commented Dec 13, 2024

This solution is a bit of a hack and bring some inconsistencies in the async api, but I feel like using webhook.site is even more of a hack, so I chose to do it this way, tell me if you have any suggestions.

Problem

some subfeatures are async (eg: speech to text async) but we have some providers that don't have any async api for it.
only sync. To make them behave asynchronously we get the response from the provider on launch, and send a request to webhook.site with the response from the provider with a random id.

in the get_results method, from the id we search in webhook.site logs and return the response from the logs. basically using webhook.site as a sort of temporary db.

Solution

the best would be to separate them into their own sync features (speech_to_text, simply) but in the mean time we can just return the response directly in the launch method, removing the 'get_results' method.

@KyrianC KyrianC marked this pull request as draft December 13, 2024 14:58
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.

1 participant