-
Notifications
You must be signed in to change notification settings - Fork 30
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
Adding support for locale aware AI #195
Conversation
server/meeting_summarization.go
Outdated
surePost := &model.Post{ | ||
Message: fmt.Sprintf("Sure, I will summarize this recording: %s/_redirect/pl/%s\n", *siteURL, recordingPost.Id), | ||
Message: fmt.Sprintf(localizer.MustLocalize(&i18n.LocalizeConfig{DefaultMessage: &i18n.Message{ID: "ai.summarize_recording", Other: "Sure, I will summarize this recording: %s/_redirect/pl/%s\n"}}), *siteURL, recordingPost.Id), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it would be better to avoid translation on the server here. We could instead send a prop or another post type that tells the client how to render the post. That way we could do all the translations on the client and the posts wouldn't get stuck in whatever language the user happened to be using at the time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking exactly the same with that. Anyway, about getting stuck in the language of the user, that is not that bad because the message is expected to be in the user language, so if the user change the language later, what you are going to get is an inconsistent header written on english, and a reply in Spanish (because that header looks like is in the message itself).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized that there are a lot of other strings that I wasn't translating, probably 10 more, passing it identifiers and generating the post type, is fine, but can be a bit weird.
This PR adds support for locale aware AI prompts. The AI will now be able to respond in the user's preferred language.
Closes #167
Description