Skip to content

feat: thread-based translation #180

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

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

OdyAsh
Copy link
Collaborator

@OdyAsh OdyAsh commented May 3, 2025

feat: Implement thread-based translation fallback to enhance async handling in AnsariClaude

OdyAsh added 7 commits May 3, 2025 16:29
* Use threads logic instead of asyncio logic when translation citations from Arabic to English
Details:
* In the previous commit (diff with the one before it), this line was present inside _finish_response's for loop: `...translate_texts_parallel([arabic_text],...)`
* The `[arabic_text]` part means that I was accidentally passing only one arabic text, so the thread was actually working sequentially (per each for loop iteraction)
* Therefore, refactored the code to gather up the required texts to be translated in one pass, then batch-translate them in another pass.
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