Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into fix-variable-typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ZuzooVn committed Sep 7, 2024
2 parents 7195877 + b1918da commit ee99b0c
Show file tree
Hide file tree
Showing 81 changed files with 88 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ parameter_rules:
type: int
default: 4
min: 1
max: 10
max: 6
help:
zh_Hans: 从 k 个候选中随机选择一个(非等概率)。
en_US: Randomly select one from k candidates (non-equal probability).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ parameter_rules:
type: int
default: 4
min: 1
max: 10
max: 6
help:
zh_Hans: 从 k 个候选中随机选择一个(非等概率)。
en_US: Randomly select one from k candidates (non-equal probability).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ parameter_rules:
type: int
default: 4
min: 1
max: 10
max: 6
help:
zh_Hans: 从 k 个候选中随机选择一个(非等概率)。
en_US: Randomly select one from k candidates (non-equal probability).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ parameter_rules:
type: int
default: 4
min: 1
max: 10
max: 6
help:
zh_Hans: 从 k 个候选中随机选择一个(非等概率)。
en_US: Randomly select one from k candidates (non-equal probability).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ parameter_rules:
type: int
default: 4
min: 1
max: 10
max: 6
help:
zh_Hans: 从 k 个候选中随机选择一个(非等概率)。
en_US: Randomly select one from k candidates (non-equal probability).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const ConfigPanel = () => {
: (
<div className={`flex items-center justify-end ${isMobile && 'w-full'}`}>
<div className='flex items-center pr-3 space-x-3'>
<span className='uppercase'>{t('share.chat.powerBy')}</span>
<span className='uppercase'>{t('share.chat.poweredBy')}</span>
{
customConfig?.replace_webapp_logo
? <img src={customConfig?.replace_webapp_logo} alt='logo' className='block w-auto h-5' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ const ConfigPanel = () => {
: (
<div className={cn('flex items-center justify-end', isMobile && 'w-full')}>
<div className='flex items-center pr-3 space-x-3'>
<span className='uppercase'>{t('share.chat.powerBy')}</span>
<span className='uppercase'>{t('share.chat.poweredBy')}</span>
{
customConfig?.replace_webapp_logo
? <img src={customConfig?.replace_webapp_logo} alt='logo' className='block w-auto h-5' />
Expand Down
11 changes: 7 additions & 4 deletions web/app/components/datasets/documents/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import React, { useMemo, useState } from 'react'
import useSWR from 'swr'
import { useTranslation } from 'react-i18next'
import { useRouter } from 'next/navigation'
import { debounce, groupBy, omit } from 'lodash-es'
import { groupBy, omit } from 'lodash-es'
import { PlusIcon } from '@heroicons/react/24/solid'
import { useDebounce } from 'ahooks'
import List from './list'
import s from './style.module.css'
import Loading from '@/app/components/base/loading'
Expand Down Expand Up @@ -87,9 +88,11 @@ const Documents: FC<IDocumentsProps> = ({ datasetId }) => {
const isDataSourceFile = dataset?.data_source_type === DataSourceType.FILE
const embeddingAvailable = !!dataset?.embedding_available

const debouncedSearchValue = useDebounce(searchValue, { wait: 500 })

const query = useMemo(() => {
return { page: currPage + 1, limit, keyword: searchValue, fetch: isDataSourceNotion ? true : '' }
}, [searchValue, currPage, isDataSourceNotion])
return { page: currPage + 1, limit, keyword: debouncedSearchValue, fetch: isDataSourceNotion ? true : '' }
}, [currPage, debouncedSearchValue, isDataSourceNotion])

const { data: documentsRes, error, mutate } = useSWR(
{
Expand Down Expand Up @@ -204,7 +207,7 @@ const Documents: FC<IDocumentsProps> = ({ datasetId }) => {
showLeftIcon
wrapperClassName='!w-[200px]'
className='!h-8 !text-[13px]'
onChange={debounce(e => setSearchValue(e.target.value), 500)}
onChange={e => setSearchValue(e.target.value)}
value={searchValue}
/>
<div className='flex gap-2 justify-center items-center !h-8'>
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/de-DE/app-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const translation = {
play: 'Abspielen',
pause: 'Pause',
playing: 'Wiedergabe',
merMaind: {
merMaid: {
rerender: 'Neu rendern',
},
never: 'Nie',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/de-DE/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ const translation = {
setAdmin: 'Als Administrator einstellen',
setMember: 'Als normales Mitglied einstellen',
setEditor: 'Als Editor einstellen',
disinvite: 'Einladung widerrufen',
disInvite: 'Einladung widerrufen',
deleteMember: 'Mitglied löschen',
you: '(Du)',
setBuilder: 'Als Builder festlegen',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/de-DE/dataset-creation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const translation = {
QATitle: 'Segmentierung im Frage-und-Antwort-Format',
QATip: 'Diese Option zu aktivieren, wird mehr Tokens verbrauchen',
QALanguage: 'Segmentierung verwenden',
emstimateCost: 'Schätzung',
estimateCost: 'Schätzung',
estimateSegment: 'Geschätzte Chunks',
segmentCount: 'Chunks',
calculating: 'Berechnung...',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/de-DE/share-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const translation = {
unpinnedTitle: 'Chats',
newChatDefaultName: 'Neues Gespräch',
resetChat: 'Gespräch zurücksetzen',
powerBy: 'Bereitgestellt von',
poweredBy: 'Bereitgestellt von',
prompt: 'Aufforderung',
privatePromptConfigTitle: 'Konversationseinstellungen',
publicPromptConfigTitle: 'Anfängliche Aufforderung',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/en-US/app-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const translation = {
pause: 'Pause',
playing: 'Playing',
loading: 'Loading',
merMaind: {
merMaid: {
rerender: 'Redo Rerender',
},
never: 'Never',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/en-US/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const translation = {
switchTipEnd: ' switching back to Basic Orchestrate.',
switchLabel: 'The app copy to be created',
removeOriginal: 'Delete the original app',
switchStart: 'Start swtich',
switchStart: 'Start switch',
typeSelector: {
all: 'ALL Types',
chatbot: 'Chatbot',
Expand Down
4 changes: 2 additions & 2 deletions web/i18n/en-US/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ const translation = {
setMember: 'Set to ordinary member',
setBuilder: 'Set as builder',
setEditor: 'Set as editor',
disinvite: 'Cancel the invitation',
disInvite: 'Cancel the invitation',
deleteMember: 'Delete Member',
you: '(You)',
},
Expand Down Expand Up @@ -392,7 +392,7 @@ const translation = {
selector: {
pageSelected: 'Pages Selected',
searchPages: 'Search pages...',
noSearchResult: 'No search resluts',
noSearchResult: 'No search results',
addPages: 'Add pages',
preview: 'PREVIEW',
},
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/en-US/dataset-creation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const translation = {
QATitle: 'Segmenting in Question & Answer format',
QATip: 'Enable this option will consume more tokens',
QALanguage: 'Segment using',
emstimateCost: 'Estimation',
estimateCost: 'Estimation',
estimateSegment: 'Estimated chunks',
segmentCount: 'chunks',
calculating: 'Calculating...',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/en-US/share-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const translation = {
unpinnedTitle: 'Chats',
newChatDefaultName: 'New conversation',
resetChat: 'Reset conversation',
powerBy: 'Powered by',
poweredBy: 'Powered by',
prompt: 'Prompt',
privatePromptConfigTitle: 'Conversation settings',
publicPromptConfigTitle: 'Initial Prompt',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/es-ES/app-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const translation = {
pause: 'Pausa',
playing: 'Reproduciendo',
loading: 'Cargando',
merMaind: {
merMaid: {
rerender: 'Rehacer Rerender',
},
never: 'Nunca',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/es-ES/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ const translation = {
setMember: 'Establecer como miembro ordinario',
setBuilder: 'Establecer como constructor',
setEditor: 'Establecer como editor',
disinvite: 'Cancelar la invitación',
disInvite: 'Cancelar la invitación',
deleteMember: 'Eliminar miembro',
you: '(Tú)',
},
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/es-ES/dataset-creation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const translation = {
QATitle: 'Segmentación en formato de pregunta y respuesta',
QATip: 'Habilitar esta opción consumirá más tokens',
QALanguage: 'Segmentar usando',
emstimateCost: 'Estimación',
estimateCost: 'Estimación',
estimateSegment: 'Fragmentos estimados',
segmentCount: 'fragmentos',
calculating: 'Calculando...',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/es-ES/share-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const translation = {
unpinnedTitle: 'Chats',
newChatDefaultName: 'Nueva conversación',
resetChat: 'Reiniciar conversación',
powerBy: 'Desarrollado por',
poweredBy: 'Desarrollado por',
prompt: 'Indicación',
privatePromptConfigTitle: 'Configuración de la conversación',
publicPromptConfigTitle: 'Indicación inicial',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/fa-IR/app-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const translation = {
pause: 'مکث',
playing: 'در حال پخش',
loading: 'در حال بارگذاری',
merMaind: {
merMaid: {
rerender: 'بازسازی مجدد',
},
never: 'هرگز',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/fa-IR/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ const translation = {
setMember: 'تنظیم به عنوان عضو عادی',
setBuilder: 'تنظیم به عنوان سازنده',
setEditor: 'تنظیم به عنوان ویرایشگر',
disinvite: 'لغو دعوت',
disInvite: 'لغو دعوت',
deleteMember: 'حذف عضو',
you: '(شما)',
},
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/fa-IR/dataset-creation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const translation = {
QATitle: 'بخشبندی در قالب پرسش و پاسخ',
QATip: 'فعال کردن این گزینه توکنهای بیشتری مصرف خواهد کرد',
QALanguage: 'بخشبندی با استفاده از',
emstimateCost: 'برآورد',
estimateCost: 'برآورد',
estimateSegment: 'بخشهای برآورد شده',
segmentCount: 'بخشها',
calculating: 'در حال محاسبه...',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/fa-IR/share-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const translation = {
unpinnedTitle: 'چت‌ها',
newChatDefaultName: 'مکالمه جدید',
resetChat: 'بازنشانی مکالمه',
powerBy: 'قدرت‌گرفته از',
poweredBy: 'قدرت‌گرفته از',
prompt: 'پیشنهاد',
privatePromptConfigTitle: 'تنظیمات مکالمه',
publicPromptConfigTitle: 'پیشنهاد اولیه',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/fr-FR/app-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const translation = {
play: 'Jouer',
pause: 'Pause',
playing: 'Jouant',
merMaind: {
merMaid: {
rerender: 'Refaire Rerendu',
},
never: 'Jamais',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/fr-FR/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ const translation = {
setAdmin: 'Définir comme administrateur',
setMember: 'Définir en tant que membre ordinaire',
setEditor: 'Définir en tant qu\'éditeur',
disinvite: 'Annuler l\'invitation',
disInvite: 'Annuler l\'invitation',
deleteMember: 'Supprimer Membre',
you: '(Vous)',
builder: 'Constructeur',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/fr-FR/dataset-creation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const translation = {
QATitle: 'Segmentation en format Question & Réponse',
QATip: 'Activer cette option consommera plus de jetons',
QALanguage: 'Segmenter en utilisant',
emstimateCost: 'Estimation',
estimateCost: 'Estimation',
estimateSegment: 'Morceaux estimés',
segmentCount: 'morceaux',
calculating: 'En calcul...',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/fr-FR/share-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const translation = {
unpinnedTitle: 'Discussions',
newChatDefaultName: 'Nouvelle conversation',
resetChat: 'Réinitialiser la conversation',
powerBy: 'Propulsé par',
poweredBy: 'Propulsé par',
prompt: 'Prompt',
privatePromptConfigTitle: 'Paramètres de conversation',
publicPromptConfigTitle: 'Prompt Initial',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/hi-IN/app-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const translation = {
pause: 'विराम',
playing: 'चल रहा है',
loading: 'लोड हो रहा है',
merMaind: {
merMaid: {
rerender: 'पुनः रीरेंडर करें',
},
never: 'कभी नहीं',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/hi-IN/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ const translation = {
setMember: 'सामान्य सदस्य के रूप में सेट करें',
setBuilder: 'निर्माता के रूप में सेट करें',
setEditor: 'संपादक के रूप में सेट करें',
disinvite: 'आमंत्रण रद्द करें',
disInvite: 'आमंत्रण रद्द करें',
deleteMember: 'सदस्य को हटाएं',
you: '(आप)',
datasetOperator: 'ज्ञान व्यवस्थापक',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/hi-IN/dataset-creation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const translation = {
QATitle: 'प्रश्न और उत्तर प्रारूप में खंड करना',
QATip: 'इस विकल्प को सक्षम करने से अधिक टोकन खर्च होंगे',
QALanguage: 'का उपयोग करके खंड करना',
emstimateCost: 'अनुमानित लागत',
estimateCost: 'अनुमानित लागत',
estimateSegment: 'अनुमानित खंड',
segmentCount: 'खंड',
calculating: 'गणना कर रहा है...',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/hi-IN/share-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const translation = {
unpinnedTitle: 'चैट',
newChatDefaultName: 'नया संवाद',
resetChat: 'संवाद रीसेट करें',
powerBy: 'संचालित है',
poweredBy: 'संचालित है',
prompt: 'प्रॉम्प्ट',
privatePromptConfigTitle: 'संवाद सेटिंग्स',
publicPromptConfigTitle: 'प्रारंभिक प्रॉम्प्ट',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/it-IT/app-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const translation = {
pause: 'Pausa',
playing: 'In Riproduzione',
loading: 'Caricamento',
merMaind: {
merMaid: {
rerender: 'Rifare il rendering',
},
never: 'Mai',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/it-IT/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ const translation = {
setMember: 'Imposta come membro ordinario',
setBuilder: 'Imposta come builder',
setEditor: 'Imposta come editor',
disinvite: 'Annulla l\'invito',
disInvite: 'Annulla l\'invito',
deleteMember: 'Elimina Membro',
you: '(Tu)',
},
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/it-IT/dataset-creation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const translation = {
QATitle: 'Segmentazione in formato Domanda & Risposta',
QATip: 'Abilitare questa opzione consumerà più token',
QALanguage: 'Segmenta usando',
emstimateCost: 'Stima',
estimateCost: 'Stima',
estimateSegment: 'Blocchi stimati',
segmentCount: 'blocchi',
calculating: 'Calcolo in corso...',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/it-IT/share-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const translation = {
unpinnedTitle: 'Chat',
newChatDefaultName: 'Nuova conversazione',
resetChat: 'Reimposta conversazione',
powerBy: 'Powered by',
poweredBy: 'Powered by',
prompt: 'Prompt',
privatePromptConfigTitle: 'Impostazioni conversazione',
publicPromptConfigTitle: 'Prompt iniziale',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/ja-JP/app-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const translation = {
pause: '一時停止',
playing: '再生中',
loading: '読み込み中',
merMaind: {
merMaid: {
rerender: '再レンダリング',
},
never: 'なし',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/ja-JP/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ const translation = {
setMember: '通常のメンバーに設定',
setBuilder: 'ビルダーに設定',
setEditor: 'エディターに設定',
disinvite: '招待をキャンセル',
disInvite: '招待をキャンセル',
deleteMember: 'メンバーを削除',
you: '(あなた様)',
},
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/ja-JP/dataset-creation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const translation = {
QATitle: '質問と回答形式でセグメント化',
QATip: 'このオプションを有効にすると、追加のトークンが消費されます',
QALanguage: '使用言語',
emstimateCost: '見積もり',
estimateCost: '見積もり',
estimateSegment: '推定チャンク数',
segmentCount: 'チャンク',
calculating: '計算中...',
Expand Down
Loading

0 comments on commit ee99b0c

Please sign in to comment.