1
0
Fork 0
forked from zovos/bot_tg

update ai dolboeba fix3

This commit is contained in:
q 2026-04-11 16:26:46 +03:00
parent 924448b4e0
commit 5e91def067

View file

@ -19,6 +19,7 @@ LLAMA_API_URL = os.getenv("LLAMA_API_URL", "https://mirror.porno4free.ru/zovos-a
DB_PATH = os.getenv("CHAT_HISTORY_DB_PATH") or str(Path(__file__).resolve().with_name("chat_history.sqlite3"))
BOT_MEMORY_NAME = os.getenv("BOT_MEMORY_NAME", "бот")
SKIP_TOKEN = "<skip>"
FORCE_DISABLE_THINKING = os.getenv("LLAMA_FORCE_DISABLE_THINKING", "1").lower() not in {"0", "false", "no"}
RECENT_MESSAGES_LIMIT = 14
SUMMARY_TRIGGER_MESSAGES = 24
@ -313,8 +314,9 @@ async def _call_llm(
max_tokens: int,
temperature: float,
top_p: float,
disable_thinking: bool = False,
disable_thinking: bool | None = None,
) -> str:
disable_thinking = FORCE_DISABLE_THINKING if disable_thinking is None else disable_thinking
url = f"{LLAMA_API_URL.rstrip('/')}/v1/chat/completions"
payload = {
"messages": messages,