mirror of
https://github.com/icereed/paperless-gpt.git
synced 2025-03-13 13:18:02 -05:00
feat: Setting to disabled auto generation of title or tags (#60)
This commit is contained in:
parent
bede39f6ef
commit
6226b8c898
2 changed files with 6 additions and 2 deletions
|
@ -149,6 +149,8 @@ If you prefer to run the application manually:
|
||||||
| `VISION_LLM_MODEL` | The model name to use for OCR (e.g., `minicpm-v`). | No |
|
| `VISION_LLM_MODEL` | The model name to use for OCR (e.g., `minicpm-v`). | No |
|
||||||
| `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 |
|
||||||
|
| `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.
|
||||||
|
|
||||||
|
|
6
main.go
6
main.go
|
@ -38,6 +38,8 @@ var (
|
||||||
visionLlmModel = os.Getenv("VISION_LLM_MODEL")
|
visionLlmModel = os.Getenv("VISION_LLM_MODEL")
|
||||||
logLevel = strings.ToLower(os.Getenv("LOG_LEVEL"))
|
logLevel = strings.ToLower(os.Getenv("LOG_LEVEL"))
|
||||||
listenInterface = os.Getenv("LISTEN_INTERFACE")
|
listenInterface = os.Getenv("LISTEN_INTERFACE")
|
||||||
|
autoGenerateTitle = os.Getenv("AUTO_GENERATE_TITLE")
|
||||||
|
autoGenerateTags = os.Getenv("AUTO_GENERATE_TAGS")
|
||||||
|
|
||||||
// Templates
|
// Templates
|
||||||
titleTemplate *template.Template
|
titleTemplate *template.Template
|
||||||
|
@ -283,8 +285,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)
|
||||||
|
|
Loading…
Reference in a new issue