Timothy Jaeryang Baek hai 4 semanas
pai
achega
f7e85cd0bf

+ 27 - 6
src/app.html

@@ -2,14 +2,35 @@
 <html lang="en">
 	<head>
 		<meta charset="utf-8" />
-		<link rel="icon" type="image/png" href="/static/favicon.png"  crossorigin="use-credentials"/>
-		<link rel="icon" type="image/png" href="/static/favicon-96x96.png" sizes="96x96" crossorigin="use-credentials" />
-		<link rel="icon" type="image/svg+xml" href="/static/favicon.svg"  crossorigin="use-credentials"/>
-		<link rel="shortcut icon" href="/static/favicon.ico"  crossorigin="use-credentials"/>
-		<link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon.png" crossorigin="use-credentials" />
+		<link rel="icon" type="image/png" href="/static/favicon.png" crossorigin="use-credentials" />
+		<link
+			rel="icon"
+			type="image/png"
+			href="/static/favicon-96x96.png"
+			sizes="96x96"
+			crossorigin="use-credentials"
+		/>
+		<link
+			rel="icon"
+			type="image/svg+xml"
+			href="/static/favicon.svg"
+			crossorigin="use-credentials"
+		/>
+		<link rel="shortcut icon" href="/static/favicon.ico" crossorigin="use-credentials" />
+		<link
+			rel="apple-touch-icon"
+			sizes="180x180"
+			href="/static/apple-touch-icon.png"
+			crossorigin="use-credentials"
+		/>
 		<meta name="apple-mobile-web-app-title" content="Open WebUI" />
 
-		<link rel="manifest" href="/manifest.json" crossorigin="use-credentials" crossorigin="use-credentials" />
+		<link
+			rel="manifest"
+			href="/manifest.json"
+			crossorigin="use-credentials"
+			crossorigin="use-credentials"
+		/>
 		<meta
 			name="viewport"
 			content="width=device-width, initial-scale=1, maximum-scale=1, viewport-fit=cover"

+ 70 - 72
src/lib/components/admin/Settings/Documents.svelte

@@ -152,8 +152,8 @@
 			return;
 		}
 		if (
-                        RAGConfig.CONTENT_EXTRACTION_ENGINE === 'docling' &&
-                        RAGConfig.DOCLING_DO_OCR &&
+			RAGConfig.CONTENT_EXTRACTION_ENGINE === 'docling' &&
+			RAGConfig.DOCLING_DO_OCR &&
 			((RAGConfig.DOCLING_OCR_ENGINE === '' && RAGConfig.DOCLING_OCR_LANG !== '') ||
 				(RAGConfig.DOCLING_OCR_ENGINE !== '' && RAGConfig.DOCLING_OCR_LANG === ''))
 		) {
@@ -164,12 +164,10 @@
 		}
 		if (
 			RAGConfig.CONTENT_EXTRACTION_ENGINE === 'docling' &&
-		        RAGConfig.DOCLING_DO_OCR === false &&
-                        RAGConfig.DOCLING_FORCE_OCR === true
+			RAGConfig.DOCLING_DO_OCR === false &&
+			RAGConfig.DOCLING_FORCE_OCR === true
 		) {
-			toast.error(
-			  $i18n.t('In order to force OCR, performing OCR must be enabled.')
-			);
+			toast.error($i18n.t('In order to force OCR, performing OCR must be enabled.'));
 			return;
 		}
 
@@ -555,7 +553,7 @@
 									placeholder={$i18n.t('Enter Docling Server URL')}
 									bind:value={RAGConfig.DOCLING_SERVER_URL}
 								/>
-                                                        </div>
+							</div>
 
 							<div class="flex w-full mt-2">
 								<div class="flex-1 flex justify-between">
@@ -568,19 +566,19 @@
 								</div>
 							</div>
 							{#if RAGConfig.DOCLING_DO_OCR}
-                                                                <div class="flex w-full mt-2">
-                                                                        <input
-                                                                                class="flex-1 w-full text-sm bg-transparent outline-hidden"
-                                                                                placeholder={$i18n.t('Enter Docling OCR Engine')}
-                                                                                bind:value={RAGConfig.DOCLING_OCR_ENGINE}
-                                                                        />
-                                                                        <input
-                                                                                class="flex-1 w-full text-sm bg-transparent outline-hidden"
-                                                                                placeholder={$i18n.t('Enter Docling OCR Language(s)')}
-                                                                                bind:value={RAGConfig.DOCLING_OCR_LANG}
-                                                                        />
-                                                                </div>
-                                                        {/if}
+								<div class="flex w-full mt-2">
+									<input
+										class="flex-1 w-full text-sm bg-transparent outline-hidden"
+										placeholder={$i18n.t('Enter Docling OCR Engine')}
+										bind:value={RAGConfig.DOCLING_OCR_ENGINE}
+									/>
+									<input
+										class="flex-1 w-full text-sm bg-transparent outline-hidden"
+										placeholder={$i18n.t('Enter Docling OCR Language(s)')}
+										bind:value={RAGConfig.DOCLING_OCR_LANG}
+									/>
+								</div>
+							{/if}
 							<div class="flex w-full mt-2">
 								<div class="flex-1 flex justify-between">
 									<div class=" self-center text-xs font-medium">
@@ -591,57 +589,57 @@
 									</div>
 								</div>
 							</div>
-                                                        <div class="flex justify-between w-full mt-2">
-                                                                <div class="self-center text-xs font-medium">
-                                                                        <Tooltip content={''} placement="top-start">
-                                                                                {$i18n.t('PDF Backend')}
-                                                                        </Tooltip>
-                                                                </div>
-                                                                <div class="">
-                                                                        <select
-                                                                                class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 text-xs bg-transparent outline-hidden text-right"
-                                                                                bind:value={RAGConfig.DOCLING_PDF_BACKEND}
-                                                                        >
-                                                                                <option value="pypdfium2">{$i18n.t('pypdfium2')}</option>
-                                                                                <option value="dlparse_v1">{$i18n.t('dlparse_v1')}</option>
-                                                                                <option value="dlparse_v2">{$i18n.t('dlparse_v2')}</option>
-                                                                                <option value="dlparse_v4">{$i18n.t('dlparse_v4')}</option>
-                                                                        </select>
-                                                                </div>
-                                                        </div>
-                                                        <div class="flex justify-between w-full mt-2">
-                                                                <div class="self-center text-xs font-medium">
-                                                                        <Tooltip content={''} placement="top-start">
-                                                                                {$i18n.t('Table Mode')}
-                                                                        </Tooltip>
-                                                                </div>
-                                                                <div class="">
-                                                                        <select
-                                                                                class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 text-xs bg-transparent outline-hidden text-right"
-                                                                                bind:value={RAGConfig.DOCLING_TABLE_MODE}
-                                                                        >
-                                                                                <option value="fast">{$i18n.t('fast')}</option>
-                                                                                <option value="accurate">{$i18n.t('accurate')}</option>
-                                                                        </select>
-                                                                </div>
-                                                        </div>
-                                                        <div class="flex justify-between w-full mt-2">
-                                                                <div class="self-center text-xs font-medium">
-                                                                        <Tooltip content={''} placement="top-start">
-                                                                                {$i18n.t('Pipeline')}
-                                                                        </Tooltip>
-                                                                </div>
-                                                                <div class="">
-                                                                        <select
-                                                                                class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 text-xs bg-transparent outline-hidden text-right"
-                                                                                bind:value={RAGConfig.DOCLING_PIPELINE}
-                                                                        >
-                                                                                <option value="standard">{$i18n.t('standard')}</option>
-                                                                                <option value="vlm">{$i18n.t('vlm')}</option>
-                                                                        </select>
-                                                                </div>
-                                                        </div>
-                                                        <div class="flex w-full mt-2">
+							<div class="flex justify-between w-full mt-2">
+								<div class="self-center text-xs font-medium">
+									<Tooltip content={''} placement="top-start">
+										{$i18n.t('PDF Backend')}
+									</Tooltip>
+								</div>
+								<div class="">
+									<select
+										class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 text-xs bg-transparent outline-hidden text-right"
+										bind:value={RAGConfig.DOCLING_PDF_BACKEND}
+									>
+										<option value="pypdfium2">{$i18n.t('pypdfium2')}</option>
+										<option value="dlparse_v1">{$i18n.t('dlparse_v1')}</option>
+										<option value="dlparse_v2">{$i18n.t('dlparse_v2')}</option>
+										<option value="dlparse_v4">{$i18n.t('dlparse_v4')}</option>
+									</select>
+								</div>
+							</div>
+							<div class="flex justify-between w-full mt-2">
+								<div class="self-center text-xs font-medium">
+									<Tooltip content={''} placement="top-start">
+										{$i18n.t('Table Mode')}
+									</Tooltip>
+								</div>
+								<div class="">
+									<select
+										class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 text-xs bg-transparent outline-hidden text-right"
+										bind:value={RAGConfig.DOCLING_TABLE_MODE}
+									>
+										<option value="fast">{$i18n.t('fast')}</option>
+										<option value="accurate">{$i18n.t('accurate')}</option>
+									</select>
+								</div>
+							</div>
+							<div class="flex justify-between w-full mt-2">
+								<div class="self-center text-xs font-medium">
+									<Tooltip content={''} placement="top-start">
+										{$i18n.t('Pipeline')}
+									</Tooltip>
+								</div>
+								<div class="">
+									<select
+										class="dark:bg-gray-900 w-fit pr-8 rounded-sm px-2 text-xs bg-transparent outline-hidden text-right"
+										bind:value={RAGConfig.DOCLING_PIPELINE}
+									>
+										<option value="standard">{$i18n.t('standard')}</option>
+										<option value="vlm">{$i18n.t('vlm')}</option>
+									</select>
+								</div>
+							</div>
+							<div class="flex w-full mt-2">
 								<div class="flex-1 flex justify-between">
 									<div class=" self-center text-xs font-medium">
 										{$i18n.t('Describe Pictures in Documents')}

+ 1 - 5
src/lib/components/channel/MessageInput.svelte

@@ -376,11 +376,7 @@
 					];
 				};
 
-				reader.readAsDataURL(
-					file['type'] === 'image/heic'
-						? await convertHeicToJpeg(file)
-						: file
-				);
+				reader.readAsDataURL(file['type'] === 'image/heic' ? await convertHeicToJpeg(file) : file);
 			} else {
 				uploadFileHandler(file);
 			}

+ 1 - 5
src/lib/components/notes/NoteEditor.svelte

@@ -544,11 +544,7 @@ ${content}
 					}
 				};
 
-				reader.readAsDataURL(
-					file['type'] === 'image/heic'
-						? await convertHeicToJpeg(file)
-						: file
-				);
+				reader.readAsDataURL(file['type'] === 'image/heic' ? await convertHeicToJpeg(file) : file);
 			});
 
 			return await uploadImagePromise;