refactor: фаза 5 — чистка (APP_VERSION, LLM константы)
- constants.py: APP_VERSION, LLM_DEFAULT_TEMPERATURE, LLM_RESPONSE_FORMAT - main.py: версия из APP_VERSION (вместо хардкод '0.1.0'×2) - llm.py: temperature и response_format из constants Всего: 85 тестов, ruff clean
This commit is contained in:
@@ -9,7 +9,7 @@ import json
|
||||
import httpx
|
||||
|
||||
from ..config import config
|
||||
from ..constants import LLM_ANALYSIS_SYSTEM_PROMPT
|
||||
from ..constants import LLM_ANALYSIS_SYSTEM_PROMPT, LLM_DEFAULT_TEMPERATURE, LLM_RESPONSE_FORMAT
|
||||
from ..logging_setup import log
|
||||
|
||||
_llm_semaphore = asyncio.Semaphore(config.llm_max_concurrent)
|
||||
@@ -60,8 +60,8 @@ async def analyze_finding(finding_data: dict) -> dict | None:
|
||||
{"role": "system", "content": LLM_ANALYSIS_SYSTEM_PROMPT},
|
||||
{"role": "user", "content": _build_user_message(finding_data)},
|
||||
],
|
||||
"temperature": 0.3,
|
||||
"response_format": {"type": "json_object"},
|
||||
"temperature": LLM_DEFAULT_TEMPERATURE,
|
||||
"response_format": {"type": LLM_RESPONSE_FORMAT},
|
||||
}
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user