diff --git a/src/hooks/useSubmit.ts b/src/hooks/useSubmit.ts index 2701fd9..e80c43f 100644 --- a/src/hooks/useSubmit.ts +++ b/src/hooks/useSubmit.ts @@ -9,7 +9,7 @@ import { _defaultChatConfig } from '@constants/chat'; import { officialAPIEndpoint } from '@constants/auth'; const useSubmit = () => { - const { t } = useTranslation('api'); + const { t, i18n } = useTranslation('api'); const error = useStore((state) => state.error); const setError = useStore((state) => state.setError); const apiEndpoint = useStore((state) => state.apiEndpoint); @@ -156,7 +156,7 @@ const useSubmit = () => { const message: MessageInterface = { role: 'user', - content: `Generate a title in less than 6 words for the following message:\nUser: ${user_message}\nAssistant: ${assistant_message}`, + content: `Generate a title in less than 6 words for the following message (language: ${i18n.language}):\n"""\nUser: ${user_message}\nAssistant: ${assistant_message}\n"""`, }; let title = (await generateTitle([message])).trim();