Improve LLM and CSV processing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Repinoid
2026-10-23 10:09:34 +03:00
co-authored by Copilot
parent aa1d15509b
commit 49171c93f9
14 changed files with 315 additions and 92 deletions
+2 -2
View File
@@ -5,8 +5,8 @@ from typing import Optional
from .state import _sessions, _lock
def store_csv(sid: str, csv_str: str) -> bool:
"""Сохранить CSV с таблицей замен.
def store_csv(sid: str, csv_str: Optional[str]) -> bool:
"""Сохранить mapping CSV или инвалидировать его, передав None.
Returns:
True если сохранено, False если сессии нет.
+2 -2
View File
@@ -5,8 +5,8 @@ from typing import Optional
from .state import _sessions, _lock
def store_result(sid: str, zip_data: bytes) -> bool:
"""Сохранить результат обработки (ZIP-архив).
def store_result(sid: str, zip_data: Optional[bytes]) -> bool:
"""Сохранить ZIP-результат или инвалидировать его, передав None.
Returns:
True если сохранено, False если сессии нет.
+2 -1
View File
@@ -77,7 +77,8 @@ def create_upload_refs_blueprint(cfg: dict = None) -> Blueprint:
added = 0
transport = cfg.get("httpxTransport") or current_app.config.get("UPLOAD_HTTPX_TRANSPORT")
try:
with httpx.Client(transport=transport, timeout=pull_timeout, follow_redirects=True) as client:
# Redirects could bypass validation against the trusted VM-buffer prefix.
with httpx.Client(transport=transport, timeout=pull_timeout, follow_redirects=False) as client:
for ref in refs:
name = safe_name(ref.get("name") or "")
url = ref.get("url") or ""