Skip to content

Fix/rm webhooks #290

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

Merged
merged 6 commits into from
Dec 17, 2024
Merged

Fix/rm webhooks #290

merged 6 commits into from
Dec 17, 2024

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
@KyrianC KyrianC marked this pull request as ready for review December 16, 2024 08:43
@juandavidcruzgomez juandavidcruzgomez merged commit 8b945b7 into master Dec 17, 2024
2 of 3 checks passed
@Daggx Daggx deleted the fix/rm-webhooks branch January 16, 2025 16:57
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.

2 participants