[Eva] ты помнишь проблему с агентом Ева?) #60

Merged
Drobysh merged 7 commits from eva/chat-5b1483-backend into main 2026-11-03 18:20:32 +00:00
Showing only changes of commit fe6019ecbc - Show all commits
+2
View File
@@ -271,6 +271,8 @@ async def call_ai(prompt: str, system_prompt: str, max_tokens: int = 500) -> str
ai_response = ai_response.strip()
ai_response = re.sub(r'\s*\([a-z_]+_[a-z_]+\)', '', ai_response)
# 🔧 ФИКС (03.11.2026): убираем длинные тире (— и –) — заменяем на дефис.
ai_response = ai_response.replace('—', '-').replace('–', '-')
return ai_response
except Exception as e:
logger.error(f"AI error: {str(e)}")