]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Add backend settings to frontend config
authorshamoon <4887959+shamoon@users.noreply.github.com>
Fri, 25 Apr 2025 05:21:41 +0000 (22:21 -0700)
committershamoon <4887959+shamoon@users.noreply.github.com>
Wed, 2 Jul 2025 18:01:54 +0000 (11:01 -0700)
[ci skip]

src-ui/src/app/data/paperless-config.ts

index eea134692d12d554f84fcc7bcaa4199e3461ed87..58030e0af5f4ee287469ac7a2004299c18e6aee9 100644 (file)
@@ -54,6 +54,11 @@ export const ConfigCategory = {
   AI: $localize`AI Settings`,
 }
 
+export const LLMEmbeddingBackendConfig = {
+  OPENAI: 'openai',
+  LOCAL: 'local',
+}
+
 export const LLMBackendConfig = {
   OPENAI: 'openai',
   OLLAMA: 'ollama',
@@ -270,6 +275,21 @@ export const PaperlessConfigOptions: ConfigOption[] = [
     config_key: 'PAPERLESS_AI_ENABLED',
     category: ConfigCategory.AI,
   },
+  {
+    key: 'llm_embedding_backend',
+    title: $localize`LLM Embedding Backend`,
+    type: ConfigOptionType.Select,
+    choices: mapToItems(LLMEmbeddingBackendConfig),
+    config_key: 'PAPERLESS_LLM_EMBEDDING_BACKEND',
+    category: ConfigCategory.AI,
+  },
+  {
+    key: 'llm_embedding_model',
+    title: $localize`LLM Embedding Model`,
+    type: ConfigOptionType.String,
+    config_key: 'PAPERLESS_LLM_EMBEDDING_MODEL',
+    category: ConfigCategory.AI,
+  },
   {
     key: 'llm_backend',
     title: $localize`LLM Backend`,
@@ -329,6 +349,8 @@ export interface PaperlessConfig extends ObjectWithId {
   barcode_enable_tag: boolean
   barcode_tag_mapping: object
   ai_enabled: boolean
+  llm_embedding_backend: string
+  llm_embedding_model: string
   llm_backend: string
   llm_model: string
   llm_api_key: string