Add configurable LM Studio flushing and LLM retries.
This commit is contained in:
@@ -17,13 +17,23 @@ Create a `.env` file in the project root with the LLM connection details and the
|
||||
prefix used to identify metadata written by PhotoTools3:
|
||||
|
||||
```dotenv
|
||||
llm_api_base_url=https://your-openai-compatible-api/v1
|
||||
llm_api_base_url=http://localhost:1234/v1
|
||||
llm_api_key=your-api-key
|
||||
llm_default_temperature=0.2
|
||||
metadata_prefix=photools3:
|
||||
LOG_LEVEL=DEBUG
|
||||
LLM_FLUSH_EVERY_PHOTOS=50
|
||||
LLM_MAX_RETRIES=5
|
||||
```
|
||||
|
||||
Keyword suggestions are restricted to the vocabulary in `config/keywords.txt`.
|
||||
`LOG_LEVEL=DEBUG` enables detailed per-request and per-photo timings. The flush
|
||||
interval uses LM Studio's native model-management API to unload and reload the
|
||||
model after every 50 attempted batch photos. This requires LM Studio's native
|
||||
`/api/v1` model-management API. Set `LLM_FLUSH_EVERY_PHOTOS=0` to disable it;
|
||||
use `0` for non-LM-Studio OpenAI-compatible providers.
|
||||
`LLM_MAX_RETRIES` controls how many corrective retry requests are allowed after
|
||||
the initial LLM response; `5` means up to 6 requests for a photo.
|
||||
|
||||
## Generate metadata
|
||||
|
||||
|
||||
Reference in New Issue
Block a user