Merge branch 'main' into webuiPath

This commit is contained in:
Icereed 2025-01-06 10:23:20 +01:00 committed by GitHub
commit f7c3c340e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View file

@ -151,6 +151,8 @@ If you prefer to run the application manually:
| `LOG_LEVEL` | The log level for the application (`info`, `debug`, `warn`, `error`). Default is `info`. | No | | `LOG_LEVEL` | The log level for the application (`info`, `debug`, `warn`, `error`). Default is `info`. | No |
| `LISTEN_INTERFACE` | The interface paperless-gpt listens to. Default is `:8080` | No | | `LISTEN_INTERFACE` | The interface paperless-gpt listens to. Default is `:8080` | No |
| `WEBUI_PATH` | The path to load static content from. Default is `./web-app/dist` | No | | `WEBUI_PATH` | The path to load static content from. Default is `./web-app/dist` | No |
| `AUTO_GENERATE_TITLE` | Enable/disable title generation when automatically applying suggestions with `paperless-gpt-auto`. Default is `true` | No |
| `AUTO_GENERATE_TAGS` | Enable/disable tag generation when automatically applying suggestions with `paperless-gpt-auto`. Default is `true` | No |
**Note:** When using Ollama, ensure that the Ollama server is running and accessible from the paperless-gpt container. **Note:** When using Ollama, ensure that the Ollama server is running and accessible from the paperless-gpt container.

View file

@ -39,6 +39,8 @@ var (
logLevel = strings.ToLower(os.Getenv("LOG_LEVEL")) logLevel = strings.ToLower(os.Getenv("LOG_LEVEL"))
listenInterface = os.Getenv("LISTEN_INTERFACE") listenInterface = os.Getenv("LISTEN_INTERFACE")
webuiPath = os.Getenv("WEBUI_PATH") webuiPath = os.Getenv("WEBUI_PATH")
autoGenerateTitle = os.Getenv("AUTO_GENERATE_TITLE")
autoGenerateTags = os.Getenv("AUTO_GENERATE_TAGS")
// Templates // Templates
titleTemplate *template.Template titleTemplate *template.Template
@ -287,8 +289,8 @@ func (app *App) processAutoTagDocuments() (int, error) {
suggestionRequest := GenerateSuggestionsRequest{ suggestionRequest := GenerateSuggestionsRequest{
Documents: documents, Documents: documents,
GenerateTitles: true, GenerateTitles: strings.ToLower(autoGenerateTitle) != "false",
GenerateTags: true, GenerateTags: strings.ToLower(autoGenerateTags) != "false",
} }
suggestions, err := app.generateDocumentSuggestions(ctx, suggestionRequest) suggestions, err := app.generateDocumentSuggestions(ctx, suggestionRequest)