-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Is your feature request related to a problem? Please describe.
Currently, we make a separate API call to detect the source language before translating text. This adds extra overhead and slows down the workflow. It’s frustrating to make multiple calls when the translation API already has the capability to detect the language.
Describe the solution you'd like
Modify Gemini to return a JSON response that includes both the translated text and the detected source language, for example:
{
"translation": "",
"source_language": ""
}
This will eliminate the need for a separate language detection API call.
Describe alternatives you've considered
The alternative is to continue using a separate API call solely for language detection, but this is less efficient and increases latency.
Additional context
This change would streamline the translation workflow, reduce API usage, and improve performance.
Note: Please add the Hacktoberfest label to this issue.