Add mssql support (#3985)

some thing
-  execsql  add connection mssql
- fix bug duckduckgo-search rate limit
- update typo vi res

---------

Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
This commit is contained in:
so95
2024-12-12 18:26:44 +07:00
committed by GitHub
parent e8d74108a5
commit d6c74ff131
10 changed files with 440 additions and 319 deletions

View File

@ -24,10 +24,18 @@ const enFlattened = flattenObject(translation_en);
const viFlattened = flattenObject(translation_vi);
const esFlattened = flattenObject(translation_es);
const zhFlattened = flattenObject(translation_zh);
const jaFlattened = flattenObject(translation_ja);
const zh_traditionalFlattened = flattenObject(translation_zh_traditional);
export const translationTable = createTranslationTable(
[enFlattened, viFlattened, esFlattened, zhFlattened, zh_traditionalFlattened],
['English', 'Vietnamese', 'Spanish', 'zh', 'zh-TRADITIONAL'],
[
enFlattened,
viFlattened,
esFlattened,
zhFlattened,
zh_traditionalFlattened,
jaFlattened,
],
['English', 'Vietnamese', 'Spanish', 'zh', 'zh-TRADITIONAL', 'ja'],
);
i18n
.use(initReactI18next)

View File

@ -353,7 +353,8 @@ The above is the content you need to summarize.`,
setAnOpenerTip: 'Set an opening greeting for users.',
knowledgeBases: 'Knowledge bases',
knowledgeBasesMessage: 'Please select',
knowledgeBasesTip: 'Select the knowledge bases to associate with this chat assistant.',
knowledgeBasesTip:
'Select the knowledge bases to associate with this chat assistant.',
system: 'System',
systemInitialValue: `You are an intelligent assistant. Please summarize the content of the knowledge base to answer the question. Please list the data in the knowledge base and answer in detail. When all knowledge base content is irrelevant to the question, your answer must include the sentence "The answer you are looking for is not found in the knowledge base!" Answers need to consider chat history.
Here is the knowledge base:
@ -455,8 +456,7 @@ The above is the content you need to summarize.`,
profileDescription: 'Update your photo and personal details here.',
maxTokens: 'Max Tokens',
maxTokensMessage: 'Max Tokens is required',
maxTokensTip:
`This sets the maximum length of the model's output, measured in the number of tokens (words or pieces of words).`,
maxTokensTip: `This sets the maximum length of the model's output, measured in the number of tokens (words or pieces of words).`,
maxTokensInvalidMessage: 'Please enter a valid number for Max Tokens.',
maxTokensMinMessage: 'Max Tokens cannot be less than 0.',
password: 'Password',

View File

@ -35,6 +35,7 @@ export default {
submit: 'Gửi',
vietnamese: 'Tiếng việt',
spanish: 'Tiếng Tây Ban Nha',
japanese: 'Tiếng Nhật',
},
login: {
login: 'Đăng nhập',
@ -447,6 +448,7 @@ export default {
'Trong các cuộc trò chuyện nhiều vòng, truy vấn vào cơ sở kiến thức được tối ưu hóa. Mô hình lớn sẽ được gọi để sử dụng thêm các token.',
howUseId: 'Làm thế nào để sử dụng ID cuộc trò chuyện?',
description: 'Mô tả về trợ lý',
betaError: `"Beta API Token" không được để trống!`,
},
setting: {
profile: 'Hồ sơ',
@ -841,7 +843,7 @@ export default {
timePeriod: 'Kỳ hạn',
qWeatherLangOptions: {
zh: 'Giản thể Trung Quốc',
'zh-hant': '繁體中文',
'zh-hant': 'Phồn thể Trung Quốc',
en: 'Tiếng Anh',
de: 'Tiếng Đức',
es: 'Tiếng Tây Ban Nha',
@ -1079,6 +1081,9 @@ export default {
jsonUploadTypeErrorMessage: 'Vui lòng tải lên tệp json',
dynamicParameters: 'Tham số động',
emailSubject: 'Tiêu đề email',
ccEmail: 'Email CC',
toEmailTip: 'to_email: Email người nhận (Bắt buộc)',
ccEmailTip: 'cc_email: Email CC (Tùy chọn)',
},
footer: {
profile: 'All rights reserved @ React',

View File

@ -2855,10 +2855,12 @@ export const QWeatherTimePeriodOptions = [
'30d',
];
export const ExeSQLOptions = ['mysql', 'postgresql', 'mariadb'].map((x) => ({
label: upperFirst(x),
value: x,
}));
export const ExeSQLOptions = ['mysql', 'postgresql', 'mariadb', 'mssql'].map(
(x) => ({
label: upperFirst(x),
value: x,
}),
);
export const SwitchElseTo = 'end_cpn_id';

View File

@ -5,7 +5,14 @@ function UserSettingLocale() {
return (
<TranslationTable
data={translationTable}
languages={['English', 'Vietnamese', 'Spanish', 'zh', 'zh-TRADITIONAL']}
languages={[
'English',
'Vietnamese',
'Spanish',
'zh',
'zh-TRADITIONAL',
'ja',
]}
/>
);
}