mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-17 20:16:32 +01:00
Use password and select config fields
This commit is contained in:
parent
f5fc04cfe2
commit
9f8b8a9f20
5 changed files with 37 additions and 16 deletions
|
|
@ -44,6 +44,7 @@ export enum ConfigOptionType {
|
|||
Boolean = 'boolean',
|
||||
JSON = 'json',
|
||||
File = 'file',
|
||||
Password = 'password',
|
||||
}
|
||||
|
||||
export const ConfigCategory = {
|
||||
|
|
@ -53,6 +54,11 @@ export const ConfigCategory = {
|
|||
AI: $localize`AI Settings`,
|
||||
}
|
||||
|
||||
export const LLMBackendConfig = {
|
||||
OPENAI: 'openai',
|
||||
OLLAMA: 'ollama',
|
||||
}
|
||||
|
||||
export interface ConfigOption {
|
||||
key: string
|
||||
title: string
|
||||
|
|
@ -267,7 +273,8 @@ export const PaperlessConfigOptions: ConfigOption[] = [
|
|||
{
|
||||
key: 'llm_backend',
|
||||
title: $localize`LLM Backend`,
|
||||
type: ConfigOptionType.String,
|
||||
type: ConfigOptionType.Select,
|
||||
choices: mapToItems(LLMBackendConfig),
|
||||
config_key: 'PAPERLESS_LLM_BACKEND',
|
||||
category: ConfigCategory.AI,
|
||||
},
|
||||
|
|
@ -281,7 +288,7 @@ export const PaperlessConfigOptions: ConfigOption[] = [
|
|||
{
|
||||
key: 'llm_api_key',
|
||||
title: $localize`LLM API Key`,
|
||||
type: ConfigOptionType.String,
|
||||
type: ConfigOptionType.Password,
|
||||
config_key: 'PAPERLESS_LLM_API_KEY',
|
||||
category: ConfigCategory.AI,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue