### What problem does this PR solve? _Briefly describe what this PR aims to solve. Include background context that will help reviewers understand the purpose of the PR._ ### Type of change - [X] New Feature (non-breaking change which adds functionality)tags/v0.14.0
| import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; | import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; | ||||
| import { App, ConfigProvider, ConfigProviderProps } from 'antd'; | import { App, ConfigProvider, ConfigProviderProps } from 'antd'; | ||||
| import enUS from 'antd/locale/en_US'; | import enUS from 'antd/locale/en_US'; | ||||
| import vi_VN from 'antd/locale/vi_VN'; | |||||
| import zhCN from 'antd/locale/zh_CN'; | import zhCN from 'antd/locale/zh_CN'; | ||||
| import zh_HK from 'antd/locale/zh_HK'; | import zh_HK from 'antd/locale/zh_HK'; | ||||
| import dayjs from 'dayjs'; | import dayjs from 'dayjs'; | ||||
| en: enUS, | en: enUS, | ||||
| zh: zhCN, | zh: zhCN, | ||||
| 'zh-TRADITIONAL': zh_HK, | 'zh-TRADITIONAL': zh_HK, | ||||
| vi: vi_VN, | |||||
| }; | }; | ||||
| const queryClient = new QueryClient(); | const queryClient = new QueryClient(); |
| 'Traditional Chinese', | 'Traditional Chinese', | ||||
| 'Indonesia', | 'Indonesia', | ||||
| 'Spanish', | 'Spanish', | ||||
| 'Vietnamese', | |||||
| ]; | ]; | ||||
| export const LanguageMap = { | export const LanguageMap = { | ||||
| 'Traditional Chinese': '繁體中文', | 'Traditional Chinese': '繁體中文', | ||||
| Indonesia: 'Indonesia', | Indonesia: 'Indonesia', | ||||
| Spanish: 'Español', | Spanish: 'Español', | ||||
| Vietnamese: 'Tiếng việt', | |||||
| }; | }; | ||||
| export const LanguageTranslationMap = { | export const LanguageTranslationMap = { | ||||
| 'Traditional Chinese': 'zh-TRADITIONAL', | 'Traditional Chinese': 'zh-TRADITIONAL', | ||||
| Indonesia: 'id', | Indonesia: 'id', | ||||
| Spanish: 'es', | Spanish: 'es', | ||||
| Vietnamese: 'vi', | |||||
| }; | }; | ||||
| export const FileMimeTypeMap = { | export const FileMimeTypeMap = { |
| import translation_en from './en'; | import translation_en from './en'; | ||||
| import translation_es from './es'; | import translation_es from './es'; | ||||
| import translation_id from './id'; | import translation_id from './id'; | ||||
| import translation_vi from './vi'; | |||||
| import translation_zh from './zh'; | import translation_zh from './zh'; | ||||
| import translation_zh_traditional from './zh-traditional'; | import translation_zh_traditional from './zh-traditional'; | ||||
| const resources = { | const resources = { | ||||
| en: translation_en, | en: translation_en, | ||||
| zh: translation_zh, | zh: translation_zh, | ||||
| 'zh-TRADITIONAL': translation_zh_traditional, | 'zh-TRADITIONAL': translation_zh_traditional, | ||||
| id: translation_id, | id: translation_id, | ||||
| es: translation_es, | es: translation_es, | ||||
| vi: translation_vi, | |||||
| }; | }; | ||||
| i18n | i18n | ||||
| detection: { | detection: { | ||||
| lookupLocalStorage: 'lng', | lookupLocalStorage: 'lng', | ||||
| }, | }, | ||||
| supportedLngs: ['en', 'zh', 'zh-TRADITIONAL', 'id', 'es'], | |||||
| supportedLngs: ['en', 'zh', 'zh-TRADITIONAL', 'id', 'es', 'vi'], | |||||
| resources, | resources, | ||||
| fallbackLng: 'en', | fallbackLng: 'en', | ||||
| interpolation: { | interpolation: { |
| multiTurnTip: | multiTurnTip: | ||||
| 'In multi-round conversations, the query to the knowledge base is optimized. The large model will be called to consume additional tokens.', | 'In multi-round conversations, the query to the knowledge base is optimized. The large model will be called to consume additional tokens.', | ||||
| howUseId: 'How to use chat ID?', | howUseId: 'How to use chat ID?', | ||||
| description: 'Description of assistant', | |||||
| }, | }, | ||||
| setting: { | setting: { | ||||
| profile: 'Profile', | profile: 'Profile', |
| multiTurnTip: | multiTurnTip: | ||||
| '在多轮对话的中,对去知识库查询的问题进行优化。会调用大模型额外消耗token。', | '在多轮对话的中,对去知识库查询的问题进行优化。会调用大模型额外消耗token。', | ||||
| howUseId: '如何使用聊天ID?', | howUseId: '如何使用聊天ID?', | ||||
| description: '助理描述', | |||||
| }, | }, | ||||
| setting: { | setting: { | ||||
| profile: '概要', | profile: '概要', |
| <Result | <Result | ||||
| status="404" | status="404" | ||||
| title="404" | title="404" | ||||
| subTitle="页面未找到,请输入正确的地址。" | |||||
| subTitle="Page not found, please enter a correct address." | |||||
| extra={ | extra={ | ||||
| <Button type="primary" onClick={() => history.push('/')}> | <Button type="primary" onClick={() => history.push('/')}> | ||||
| 返回主页 | |||||
| Business | |||||
| </Button> | </Button> | ||||
| } | } | ||||
| /> | /> |
| > | > | ||||
| <Input placeholder={t('namePlaceholder')} /> | <Input placeholder={t('namePlaceholder')} /> | ||||
| </Form.Item> | </Form.Item> | ||||
| <Form.Item name={'description'} label={t('description')}> | |||||
| <Input placeholder={t('descriptionPlaceholder')} /> | |||||
| </Form.Item> | |||||
| <Form.Item | <Form.Item | ||||
| name="icon" | name="icon" | ||||
| label={t('assistantAvatar')} | label={t('assistantAvatar')} |
| if (title === 'login') { | if (title === 'login') { | ||||
| const code = await login({ | const code = await login({ | ||||
| email: params.email, | |||||
| email: `${params.email}`.trim(), | |||||
| password: rsaPassWord, | password: rsaPassWord, | ||||
| }); | }); | ||||
| if (code === 0) { | if (code === 0) { |
| es: 'es', | es: 'es', | ||||
| doc_store: 'storage', | doc_store: 'storage', | ||||
| redis: 'redis', | redis: 'redis', | ||||
| storage: 'minio', | |||||
| database: 'database', | database: 'database', | ||||
| }; | }; | ||||