mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-21 22:16:44 +01:00
Use a frontend config
This commit is contained in:
parent
3186550fd7
commit
f5fc04cfe2
11 changed files with 277 additions and 73 deletions
|
|
@ -2,7 +2,7 @@ import json
|
|||
import logging
|
||||
|
||||
from documents.models import Document
|
||||
from paperless.ai.client import run_llm_query
|
||||
from paperless.ai.client import AIClient
|
||||
|
||||
logger = logging.getLogger("paperless.ai.ai_classifier")
|
||||
|
||||
|
|
@ -49,7 +49,8 @@ def get_ai_document_classification(document: Document) -> dict:
|
|||
"""
|
||||
|
||||
try:
|
||||
result = run_llm_query(prompt)
|
||||
client = AIClient()
|
||||
result = client.run_llm_query(prompt)
|
||||
suggestions = parse_ai_classification_response(result)
|
||||
return suggestions or {}
|
||||
except Exception:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue