mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 19:17:13 -05:00 
			
		
		
		
	Add backend settings to frontend config
[ci skip]
This commit is contained in:
		
							parent
							
								
									df8f07555f
								
							
						
					
					
						commit
						42e3684211
					
				@ -54,6 +54,11 @@ export const ConfigCategory = {
 | 
				
			|||||||
  AI: $localize`AI Settings`,
 | 
					  AI: $localize`AI Settings`,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export const LLMEmbeddingBackendConfig = {
 | 
				
			||||||
 | 
					  OPENAI: 'openai',
 | 
				
			||||||
 | 
					  LOCAL: 'local',
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const LLMBackendConfig = {
 | 
					export const LLMBackendConfig = {
 | 
				
			||||||
  OPENAI: 'openai',
 | 
					  OPENAI: 'openai',
 | 
				
			||||||
  OLLAMA: 'ollama',
 | 
					  OLLAMA: 'ollama',
 | 
				
			||||||
@ -270,6 +275,21 @@ export const PaperlessConfigOptions: ConfigOption[] = [
 | 
				
			|||||||
    config_key: 'PAPERLESS_AI_ENABLED',
 | 
					    config_key: 'PAPERLESS_AI_ENABLED',
 | 
				
			||||||
    category: ConfigCategory.AI,
 | 
					    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',
 | 
					    key: 'llm_backend',
 | 
				
			||||||
    title: $localize`LLM Backend`,
 | 
					    title: $localize`LLM Backend`,
 | 
				
			||||||
@ -329,6 +349,8 @@ export interface PaperlessConfig extends ObjectWithId {
 | 
				
			|||||||
  barcode_enable_tag: boolean
 | 
					  barcode_enable_tag: boolean
 | 
				
			||||||
  barcode_tag_mapping: object
 | 
					  barcode_tag_mapping: object
 | 
				
			||||||
  ai_enabled: boolean
 | 
					  ai_enabled: boolean
 | 
				
			||||||
 | 
					  llm_embedding_backend: string
 | 
				
			||||||
 | 
					  llm_embedding_model: string
 | 
				
			||||||
  llm_backend: string
 | 
					  llm_backend: string
 | 
				
			||||||
  llm_model: string
 | 
					  llm_model: string
 | 
				
			||||||
  llm_api_key: string
 | 
					  llm_api_key: string
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user