fix: Use account locale when generating PDF FAQs (#12491)
## Linear Link: https://linear.app/chatwoot/issue/CW-5636/pdf-faqs-captain-generates-faqs-in-the-english-only ## Description PDF Faqs should be generated in the same language as set in account ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested? This has been tested via UI, by setting account language to arabic and upload the pdf for faq generation (pdf content in Hindi) <img width="1045" height="1085" alt="image" src="https://github.com/user-attachments/assets/10385181-578e-4933-afc4-4609a6abcec8" /> ## Checklist: - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
committed by
GitHub
parent
9a5a71b34f
commit
5c5abc24e3
@@ -33,7 +33,8 @@ class Captain::Documents::ResponseBuilderJob < ApplicationJob
|
||||
Captain::Llm::PaginatedFaqGeneratorService.new(
|
||||
document,
|
||||
pages_per_chunk: options[:pages_per_chunk],
|
||||
max_pages: options[:max_pages]
|
||||
max_pages: options[:max_pages],
|
||||
language: document.account.locale_english_name
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user