+ );
+};
+
+export default LanguageSwitcher;
\ No newline at end of file
diff --git a/src/index.css b/src/index.css
index 08a3ac9..01a3414 100644
--- a/src/index.css
+++ b/src/index.css
@@ -1,68 +1,15 @@
:root {
- font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
- line-height: 1.5;
- font-weight: 400;
-
color-scheme: light dark;
- color: rgba(255, 255, 255, 0.87);
- background-color: #242424;
-
- font-synthesis: none;
- text-rendering: optimizeLegibility;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
}
-a {
- font-weight: 500;
- color: #646cff;
- text-decoration: inherit;
-}
-a:hover {
- color: #535bf2;
+html, body, #root {
+ height: 100%;
}
body {
margin: 0;
- display: flex;
- place-items: center;
- min-width: 320px;
- min-height: 100vh;
}
-h1 {
- font-size: 3.2em;
- line-height: 1.1;
-}
-
-button {
- border-radius: 8px;
- border: 1px solid transparent;
- padding: 0.6em 1.2em;
- font-size: 1em;
- font-weight: 500;
- font-family: inherit;
- background-color: #1a1a1a;
- cursor: pointer;
- transition: border-color 0.25s;
-}
-button:hover {
- border-color: #646cff;
-}
-button:focus,
-button:focus-visible {
- outline: 4px auto -webkit-focus-ring-color;
-}
-
-@media (prefers-color-scheme: light) {
- :root {
- color: #213547;
- background-color: #ffffff;
- }
- a:hover {
- color: #747bff;
- }
- button {
- background-color: #f9f9f9;
- }
+a {
+ text-decoration: inherit;
}
diff --git a/src/locales/en.ts b/src/locales/en.ts
new file mode 100644
index 0000000..99f2dee
--- /dev/null
+++ b/src/locales/en.ts
@@ -0,0 +1,426 @@
+export default {
+ translation: {
+ common: {
+ noResults: 'No results.',
+ selectPlaceholder: 'Please select',
+ selectAll: 'Select all',
+ delete: 'Delete',
+ deleteModalTitle: 'Are you sure to delete?',
+ ok: 'Yes',
+ cancel: 'No',
+ total: 'Total',
+ rename: 'Rename',
+ name: 'Name',
+ save: 'Save',
+ namePlaceholder: 'Please input name',
+ next: 'Next',
+ create: 'Create',
+ edit: 'Edit',
+ upload: 'Upload',
+ english: 'English',
+ portugueseBr: 'Portuguese (Brazil)',
+ chinese: 'Simplified Chinese',
+ traditionalChinese: 'Traditional Chinese',
+ language: 'Language',
+ languageMessage: 'Please input language',
+ languagePlaceholder: 'Please select language',
+ copy: 'Copy',
+ copied: 'Copied successfully',
+ comingSoon: 'Coming soon',
+ download: 'Download',
+ close: 'Close',
+ preview: 'Preview',
+ move: 'Move',
+ warn: 'Warn',
+ action: 'Action',
+ s: 's',
+ pleaseSelect: 'Please select',
+ pleaseInput: 'Please input',
+ submit: 'Submit',
+ clear: 'Clear',
+ embedIntoSite: 'Embed into site',
+ previousPage: 'Previous page',
+ nextPage: 'Next page',
+ add: 'Add',
+ remove: 'Remove',
+ search: 'Search',
+ noDataFound: 'No data found.',
+ noData: 'No data',
+ promptPlaceholder: 'Please input or use / to quickly insert variables.',
+ },
+ login: {
+ login: 'Login',
+ signUp: 'Sign Up',
+ loginDescription: 'Nice to see you again!',
+ registerDescription: 'Nice to have you join!',
+ emailLabel: 'Email',
+ emailPlaceholder: 'Please enter email address',
+ passwordLabel: 'Password',
+ passwordPlaceholder: 'Please enter password',
+ rememberMe: 'Remember me',
+ signInTip: "Don't have an account?",
+ signUpTip: 'Already have an account?',
+ nicknameLabel: 'Name',
+ nicknamePlaceholder: 'Please enter name',
+ register: 'Create account',
+ continue: 'Continue',
+ title: 'Start building your intelligent assistant',
+ description:
+ 'Sign up for free to explore top-tier RAG technology. Create knowledge bases and AI to enhance your business',
+ review: 'From 500+ reviews',
+ },
+ header: {
+ knowledgeBase: 'Knowledge Base',
+ chat: 'Chat',
+ register: 'Register',
+ signin: 'Sign In',
+ home: 'Home',
+ setting: 'User Settings',
+ logout: 'Logout',
+ fileManager: 'File Manager',
+ flow: 'Agent',
+ search: 'Search',
+ welcome: 'Welcome to',
+ dataset: 'Dataset',
+ },
+ knowledgeList: {
+ welcome: 'Welcome back',
+ description: 'Which knowledge base are we going to use today?',
+ createKnowledgeBase: 'Create knowledge base',
+ name: 'Name',
+ namePlaceholder: 'Please input name',
+ doc: 'Doc',
+ searchKnowledgePlaceholder: 'Search',
+ noMoreData: 'No more data',
+ },
+ knowledgeDetails: {
+ fileSize: 'File size',
+ fileType: 'File type',
+ uploadedBy: 'Created by',
+ notGenerated: 'Not generated',
+ generatedOn: 'Generated on',
+ subbarFiles: 'Files',
+ generate: 'Generate',
+ raptor: 'Raptor',
+ processingType: 'Processing type',
+ dataPipeline: 'Data pipeline',
+ operations: 'Operations',
+ taskId: 'Task ID',
+ duration: 'Duration',
+ details: 'Details',
+ status: 'Status',
+ task: 'Task',
+ startDate: 'Start date',
+ source: 'Source',
+ fileName: 'File name',
+ datasetLogs: 'Dataset logs',
+ fileLogs: 'File logs',
+ overview: 'Overview',
+ success: 'Success',
+ failed: 'Failed',
+ completed: 'Completed',
+ datasetLog: 'Dataset log',
+ created: 'Created',
+ learnMore: 'Learn more',
+ general: 'General',
+ chunkMethodTab: 'Chunk method',
+ testResults: 'Test results',
+ testSetting: 'Test setting',
+ retrievalTesting: 'Retrieval testing',
+ retrievalTestingDescription:
+ 'Conduct retrieval testing to check if RAGFlow can retrieve the expected content for the large language model (LLM).',
+ Parse: 'Parse',
+ dataset: 'Dataset',
+ testing: 'Testing',
+ configuration: 'Configuration',
+ knowledgeGraph: 'Knowledge graph',
+ files: 'files',
+ name: 'Name',
+ namePlaceholder: 'Please input name',
+ doc: 'Doc',
+ datasetDescription: 'You can only chat after parsing is successful.',
+ addFile: 'Add file',
+ searchFiles: 'Search files',
+ localFiles: 'Local files',
+ emptyFiles: 'Create empty file',
+ webCrawl: 'Web crawl',
+ chunkNumber: 'Chunk number',
+ uploadDate: 'Upload date',
+ chunkMethod: 'Chunk method',
+ enabled: 'Enabled',
+ disabled: 'Disabled',
+ action: 'Action',
+ parsingStatus: 'Parsing status',
+ parsingStatusTip:
+ 'The time for text parsing depends on many factors. If knowledge graph, RAPTOR, automatic question extraction, automatic keyword extraction and other functions are enabled, the time will be longer. If the parsing progress bar does not update for a long time, you can also refer to these two FAQs: https://ragflow.io/docs/dev/faq#why-does-my-document-parsing-stall-at-under-one-percent.',
+ processBeginAt: 'Begin at',
+ processDuration: 'Duration',
+ progressMsg: 'Progress',
+ noTestResultsForRuned: 'No relevant results found, please try adjusting the query statement or parameters',
+ noTestResultsForNotRuned: 'No test has been run yet, results will be displayed here',
+ testingDescription:
+ 'Please complete the recall test: ensure that your configuration can recall the correct text blocks from the database. If you adjust the default settings here, such as keyword similarity weight, please note that the changes here will not be automatically saved. Please be sure to synchronize and update related settings in the chat assistant settings or recall operator settings.',
+ similarityThreshold: 'Similarity threshold',
+ similarityThresholdTip:
+ 'We use a hybrid similarity score to evaluate the distance between two lines of text. It is a weighted keyword similarity and vector cosine similarity. If the similarity between the query and the chunk is less than this threshold, the chunk will be filtered out. The default setting is 0.2, which means that the hybrid similarity score of the text chunk must be at least 20 to be recalled.',
+ vectorSimilarityWeight: 'Vector similarity weight',
+ vectorSimilarityWeightTip:
+ 'We use a hybrid similarity score to evaluate the distance between two lines of text. It is a weighted keyword similarity and vector cosine similarity or rerank score (0~1). The sum of the two weights is 1.0.',
+ keywordSimilarityWeight: 'Keyword similarity weight',
+ keywordSimilarityWeightTip:
+ 'We use a hybrid similarity score to evaluate the distance between two lines of text. It is a weighted keyword similarity and vector cosine similarity or rerank score (0~1). The sum of the two weights is 1.0.',
+ testText: 'Test text',
+ testTextPlaceholder: 'Please input your question!',
+ testingLabel: 'Testing',
+ similarity: 'Hybrid similarity',
+ termSimilarity: 'Term similarity',
+ vectorSimilarity: 'Vector similarity',
+ hits: 'Hits',
+ view: 'View',
+ filesSelected: 'Files selected',
+ upload: 'Upload',
+ run: 'Parse',
+ runningStatus0: 'Unparsed',
+ runningStatus1: 'Parsing',
+ runningStatus2: 'Cancel',
+ runningStatus3: 'Success',
+ runningStatus4: 'Failed',
+ pageRanges: 'Page ranges',
+ pageRangesTip:
+ 'Page ranges: Define the page ranges that need to be parsed. Pages not included in these ranges will be ignored.',
+ fromPlaceholder: 'From',
+ fromMessage: 'Missing start page number',
+ toPlaceholder: 'To',
+ toMessage: 'Missing end page number (exclusive)',
+ layoutRecognize: 'PDF parser',
+ layoutRecognizeTip:
+ 'Use visual models for PDF layout analysis to better identify document structure, find the location of titles, text blocks, images and tables. If you choose the Naive option, you can only get the plain text of the PDF. Please note that this function only applies to PDF documents and does not work for other documents. For more information, please refer to https://ragflow.io/docs/dev/select_pdf_parser.',
+ taskPageSize: 'Task page size',
+ taskPageSizeMessage: 'Please input your task page size!',
+ taskPageSizeTip: `If layout recognition is used, PDF files will be divided into consecutive groups. Layout analysis will be performed in parallel between groups to improve processing speed. "Task page size" determines the size of the group. The larger the page size, the lower the chance of splitting continuous text between pages into different chunks.`,
+ addPage: 'Add page',
+ greaterThan: 'The current value must be greater than the starting value!',
+ greaterThanPrevious: 'The current value must be greater than the previous value!',
+ selectFiles: 'Select files',
+ changeSpecificCategory: 'Change specific category',
+ uploadTitle: 'Click or drag files to this area to upload',
+ uploadDescription:
+ 'Support single or batch upload. For local deployment, the total file size limit for a single upload is 1GB, the number of files for a single batch upload does not exceed 32, and there is no limit on the number of files for a single account. For demo.ragflow.io: the total file size limit for each upload is 10MB, each file must not exceed 10MB, and each account can upload up to 128 files. It is strictly prohibited to upload prohibited files.',
+ chunk: 'Chunk',
+ bulk: 'Bulk',
+ cancel: 'Cancel',
+ close: 'Close',
+ rerankModel: 'Rerank model',
+ rerankPlaceholder: 'Please select',
+ rerankTip: `Optional: If no rerank model is selected, the system will default to a hybrid query method that combines keyword similarity and vector cosine similarity; if a rerank model is set, the vector similarity part in the hybrid query will be replaced by rerank scoring. Please note: using a rerank model will be very time-consuming. If you need to use a rerank model, it is recommended to use a SaaS rerank model service; if you prefer to use a locally deployed rerank model, please make sure you start RAGFlow using docker-compose-gpu.yml.`,
+ topK: 'Top-K',
+ topKTip: `Used in conjunction with the Rerank model to set the number of text blocks passed to the Rerank model.`,
+ delimiter: `Text segmentation delimiter`,
+ delimiterTip:
+ 'Support multiple characters as delimiters, multiple characters are wrapped with two backticks \\`\\`. If configured as: \\n`##`; the system will first use line breaks, two # signs and semicolons to split the text, and then assemble the small text blocks according to the size set by "Suggested text block size". Please make sure you understand the above text segmentation and chunking mechanism before setting text segmentation delimiters.',
+ html4excel: 'Table to HTML',
+ html4excelTip: `Used in conjunction with the General chunking method. When not enabled, table files (XLSX, XLS (Excel 97-2003)) will be parsed as key-value pairs by row. When enabled, table files will be parsed as HTML tables. If the original table exceeds 12 rows, the system will automatically split it into multiple HTML tables with 12 rows each. For more details, please refer to https://ragflow.io/docs/dev/enable_excel2html.`,
+ autoKeywords: 'Auto keyword extraction',
+ autoKeywordsTip: `Automatically extract N keywords from each text block to improve query accuracy. Please note: This function uses the default chat model set in "System Model Settings" to extract keywords, so it will also consume more tokens. In addition, you can also manually update the generated keywords. For details, please see https://ragflow.io/docs/dev/autokeyword_autoquestion.`,
+ autoQuestions: 'Auto question extraction',
+ autoQuestionsTip: `Use the chat model set in "System Model Settings" to extract N questions from each text block in the knowledge base to improve its ranking score. Please note that enabling it will consume additional tokens. You can view and edit the results in the chunk list. If automatic question extraction fails, it will not hinder the entire chunking process, and only empty results will be added to the original text block. For details, please see https://ragflow.io/docs/dev/autokeyword_autoquestion.`,
+ redo: 'Clear existing {{chunkNum}} chunks?',
+ setMetaData: 'Set metadata',
+ pleaseInputJson: 'Please input JSON',
+ documentMetaTips: `
Metadata is in JSON format (not searchable). If any chunk of this document is included in the prompt, it will be added to the LLM's prompt.
+
Example:
+Metadata is:
+
+{
+ "Author": "Alex Dowson",
+ "Date": "2024-11-12"
+}
+
+The prompt will be:
+
Document: the_name_of_document
+
Author: Alex Dowson
+
Date: 2024-11-12
+
Related segments are as follows:
+
+
This is chunk content....
+
This is chunk content....
+
+`,
+ metaData: 'Metadata',
+ deleteDocumentConfirmContent:
+ 'This document is associated with a knowledge graph. After deletion, related node and relationship information will be deleted, but the graph will not be updated immediately. The update graph action is performed during the process of parsing new documents that carry knowledge graph extraction tasks.',
+ plainText: 'Naive',
+ reRankModelWaring: 'Rerank model is very time-consuming.',
+ theDocumentBeingParsedCannotBeDeleted: 'The document being parsed cannot be deleted',
+ },
+ knowledgeConfiguration: {
+ deleteGenerateModalContent: `
+
Deleting the generated {{type}} results
+ will remove all derived entities and relationships from this dataset.
+ Your original files will remain unchanged.
+
+ Do you want to continue?
+ `,
+ extractRaptor: 'Extract Raptor from documents',
+ extractKnowledgeGraph: 'Extract knowledge graph from documents',
+ filterPlaceholder: 'Please input',
+ fileFilterTip: '',
+ fileFilter: 'Regex matching expression',
+ setDefaultTip: '',
+ setDefault: 'Set default',
+ eidtLinkDataPipeline: 'Edit data pipeline',
+ linkPipelineSetTip: 'Manage data pipeline links with this dataset',
+ default: 'Default',
+ dataPipeline: 'Data pipeline',
+ linkDataPipeline: 'Link data pipeline',
+ enableAutoGenerate: 'Enable auto generate',
+ teamPlaceholder: 'Please select team',
+ dataFlowPlaceholder: 'Please select data flow',
+ buildItFromScratch: 'Build it from scratch',
+ dataFlow: 'Data flow',
+ parseType: 'Chunk method',
+ manualSetup: 'Manual setup',
+ builtIn: 'Built-in',
+ titleDescription: 'Update your knowledge base details here, especially the chunk method.',
+ name: 'Knowledge base name',
+ photo: 'Knowledge base photo',
+ photoTip: 'You can upload files up to 4MB',
+ description: 'Description',
+ language: 'Document language',
+ languageMessage: 'Please input language',
+ languagePlaceholder: 'Please input language',
+ permissions: 'Permissions',
+ embeddingModel: 'Embedding model',
+ chunkTokenNumber: 'Suggested chunk size',
+ chunkTokenNumberMessage: 'Chunk token number is required',
+ embeddingModelTip:
+ 'The default embedding model used by the knowledge base. Once text chunks have been generated in the knowledge base, you will not be able to change the default embedding model unless you delete all text chunks in the knowledge base.',
+ permissionsTip:
+ 'If the knowledge base permission is set to "Team", all team members can operate the knowledge base.',
+ chunkTokenNumberTip:
+ 'The recommended token number threshold for generating text chunks. If the token number of the small text segment obtained by segmentation does not reach this threshold, it will continue to merge with subsequent text segments until merging the next text segment will exceed this threshold, and then a final text chunk will be generated. If the system never encounters a text segmentation delimiter when segmenting text segments, even if the token number of the text segment has exceeded this threshold, the system will not generate new text chunks.',
+ chunkMethod: 'Chunk method',
+ chunkMethodTip: 'The description is on the right.',
+ upload: 'Upload',
+ english: 'English',
+ chinese: 'Chinese',
+ embeddingModelPlaceholder: 'Please select embedding model',
+ chunkMethodPlaceholder: 'Please select chunk method',
+ save: 'Save',
+ me: 'Only me',
+ team: 'Team',
+ cancel: 'Cancel',
+ methodTitle: 'Chunk method description',
+ methodExamples: 'Examples',
+ methodExamplesDescription:
+ 'To help you understand better, we provide relevant screenshots for your reference.',
+ dialogueExamplesTitle: 'Dialogue examples',
+ methodEmpty: 'This will show a visual explanation of the knowledge base category',
+ book: `
Supported file formats are DOCX, PDF, TXT.
+ Since a book is very long, not all parts are useful. If it is a PDF,
+ please set page ranges for each book to eliminate negative effects and save analysis computing time.
`,
+ laws: `
Supported file formats are DOCX, PDF, TXT.
+ Legal documents have very strict writing formats. We use text features to detect split points.
+
+ The granularity of chunks is consistent with 'ARTICLE', and all upper-level text will be included in the chunk.
+
`,
+ manual: `
Only PDF is supported.
+ We assume that the manual has a hierarchical section structure. We use the lowest section title as the pivot for slicing the document.
+ Therefore, figures and tables in the same section will not be split, and the chunk size may be large.
+
This method applies a simple approach to chunk files:
+
+
The system will use a visual detection model to split continuous text into multiple segments.
+
Next, these continuous segments are merged into chunks with no more than "Token number" tokens.
`,
+ paper: `
Only PDF files are supported.
+ If our model works well, the paper will be sliced by its sections, such as Abstract, 1.1, 1.2, etc.
+ The advantage of this is that the LLM can better summarize the content of relevant sections in the paper,
+ produce more comprehensive answers, and help readers better understand the paper.
+ The disadvantage is that it increases the context of LLM conversations and increases computational costs,
+ so during the conversation, you can consider reducing the 'topN' setting.
`,
+ presentation: `
Supported file formats are PDF, PPTX.
+ Each page will be treated as a chunk. And thumbnails of each page will be stored.
+ All PPT files you upload will be automatically chunked using this method, without the need to set it for each PPT file.
`,
+ qa: `
+ This chunk method supports excel and csv/txt file formats.
+
+
+ If the file is in excel format, it should consist of two columns
+ without headers: one for questions and another for answers,
+ with the question column before the answer column. Multiple sheets are
+ acceptable as long as the columns are correctly structured.
+
+
+ If the file is in csv/txt format,
+ it should be UTF-8 encoded and use TAB as the delimiter to separate questions and answers.
+
+
+
+ Text lines that fail to follow the above rules will be ignored, and
+ each Q&A pair will be considered a unique chunk.
+
+
`,
+ resume: `
Supported file formats are DOCX, PDF, TXT.
+
+ Resumes come in various formats, just like a person's personality, but we often have to organize them into structured data for easy searching.
+
+ Instead of chunking resumes, we parse resumes into structured data. As an HR, you can throw away all resumes,
+ and you only need to talk to 'RAGFlow' to list all qualified candidates.
+
+ `,
+ table: `
Supports XLSX and CSV/TXT format files.
+ Here are some tips:
+
+
For csv or txt files, the delimiter between columns is TAB.
+
The first row must be column headers.
+
Column headers must be meaningful terms so that our large language model can understand.
+ When listing some synonyms, it is best to use slashes '/' to separate them, or even better
+ to use square brackets to enumerate values, such as 'gender/sex(male,female)'.