Use a frontend config

This commit is contained in:
shamoon 2025-04-23 19:24:32 -07:00
parent 3186550fd7
commit f5fc04cfe2
No known key found for this signature in database
11 changed files with 277 additions and 73 deletions

View file

@ -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: