diff --git a/backend/open_webui/retrieval/utils.py b/backend/open_webui/retrieval/utils.py index 9444ade95..17f1438da 100644 --- a/backend/open_webui/retrieval/utils.py +++ b/backend/open_webui/retrieval/utils.py @@ -70,7 +70,9 @@ def query_doc( limit=k, ) - log.info(f"query_doc:result {result.ids} {result.metadatas}") + if result: + log.info(f"query_doc:result {result.ids} {result.metadatas}") + return result except Exception as e: print(e) diff --git a/src/lib/components/admin/Settings/Documents.svelte b/src/lib/components/admin/Settings/Documents.svelte index eca6513dd..2a4fe38f5 100644 --- a/src/lib/components/admin/Settings/Documents.svelte +++ b/src/lib/components/admin/Settings/Documents.svelte @@ -576,8 +576,6 @@ -
- {#if showTikaServerUrl}
@@ -591,268 +589,266 @@ {/if}
-
-
{$i18n.t('Google Drive')}
+
-
-
-
{$i18n.t('Enable Google Drive')}
-
- -
+
{$i18n.t('Google Drive')}
+ +
+
+
{$i18n.t('Enable Google Drive')}
+
+
+
-
+
-
-
{$i18n.t('Query Params')}
+
+
{$i18n.t('Query Params')}
-
-
-
{$i18n.t('Top K')}
+
+
+
{$i18n.t('Top K')}
+ +
+ +
+
+ + {#if querySettings.hybrid === true} +
+
+ {$i18n.t('Minimum Score')} +
- - {#if querySettings.hybrid === true} -
-
- {$i18n.t('Minimum Score')} -
- -
- -
-
- {/if} -
- - {#if querySettings.hybrid === true} -
- {$i18n.t( - 'Note: If you set a minimum score, the search will only return documents with a score greater than or equal to the minimum score.' - )} -
{/if} +
-
-
{$i18n.t('RAG Template')}
- + {$i18n.t( + 'Note: If you set a minimum score, the search will only return documents with a score greater than or equal to the minimum score.' + )} +
+ {/if} + +
+
{$i18n.t('RAG Template')}
+ +