iachat/app/models/concerns
Shivam Mishra 3a4249da11
feat: Add support for multi-language support for Captain (#11068)
This PR implements the following features

- FAQs from conversations will be generated in account language
- Contact notes will be generated in account language
- Copilot chat will respond in user language, unless the agent asks the
question in a different language

## Changes
### Copilot Chat

- Update the prompt to include an instruction for the language, the bot
will reply in asked language, but will default to account language
- Update the `ChatService` class to include pass the language to
`SystemPromptsService`

### FAQ and Contact note generation

- Update contact note generator and conversation generator to include
account locale
- Pass the account locale to `SystemPromptsService`


<details><summary>Screenshots</summary>

#### FAQs being generated in system langauge

![CleanShot 2025-03-12 at 13 32
30@2x](https://github.com/user-attachments/assets/84685bd8-3785-4432-aff3-419f60d96dd3)


#### Copilot responding in system language

![CleanShot 2025-03-12 at 13 47
03@2x](https://github.com/user-attachments/assets/38383293-4228-47bd-b74a-773e9a194f90)


</details>

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav <pranav@chatwoot.com>
2025-03-19 18:25:33 -07:00
..
.keep
access_tokenable.rb
account_cache_revalidator.rb feat: expiry for cache keys [CW-3038] (#8793) 2024-01-29 15:27:26 +05:30
activity_message_handler.rb feat: add activity message for SLA (#9100) 2024-03-13 20:05:34 +05:30
assignment_handler.rb feat: Add support for multi-language support for Captain (#11068) 2025-03-19 18:25:33 -07:00
auto_assignment_handler.rb fix: assignee_changed callback not getting triggered during conversation creation (#9334) 2024-05-06 11:48:17 -07:00
availability_statusable.rb
avatarable.rb
cache_keys.rb feat: expiry for cache keys [CW-3038] (#8793) 2024-01-29 15:27:26 +05:30
channelable.rb feat: add audit trail for channel updates (#7396) 2023-07-21 12:08:19 +05:30
content_attribute_validator.rb
conversation_mute_helpers.rb feat: Ability to block contacts permanently (#8922) 2024-02-21 14:18:42 -08:00
featurable.rb
json_schema_validator.rb feat: Add the ability to un-assign teams using automation (#9668) 2024-06-26 12:40:36 -07:00
label_activity_message_handler.rb feat: add activity message for SLA (#9100) 2024-03-13 20:05:34 +05:30
labelable.rb
liquidable.rb
llm_formattable.rb feat(ee): Add copilot integration (v1) to the conversation sidebar (#10566) 2024-12-10 15:36:48 -08:00
message_filter_helpers.rb
out_of_offisable.rb
priority_activity_message_handler.rb
pubsubable.rb
push_data_helper.rb feat: UI to show the SLA threshold in chat screen (#9146) 2024-04-04 15:46:46 +05:30
reauthorizable.rb feat: new re-authorization flow for Microsoft (#9510) 2024-05-23 16:03:40 +05:30
reportable.rb
sla_activity_message_handler.rb feat: add activity message for SLA (#9100) 2024-03-13 20:05:34 +05:30
sort_handler.rb feat: Add support for ascending and descending options in sort (#8542) 2023-12-12 17:15:48 -08:00
sso_authenticatable.rb
team_activity_message_handler.rb feat: add activity message for SLA (#9100) 2024-03-13 20:05:34 +05:30
user_attribute_helpers.rb