Compare commits
No commits in common. "main" and "feature/FenyaBot" have entirely different histories.
main
...
feature/Fe
2 changed files with 12 additions and 22 deletions
|
|
@ -614,21 +614,17 @@ async def _call_llm(
|
||||||
) -> str:
|
) -> str:
|
||||||
disable_thinking = FORCE_DISABLE_THINKING if disable_thinking is None else disable_thinking
|
disable_thinking = FORCE_DISABLE_THINKING if disable_thinking is None else disable_thinking
|
||||||
|
|
||||||
try:
|
result = await _call_single_model(
|
||||||
result = await _call_single_model(
|
messages,
|
||||||
messages,
|
api_url=LLAMA_API_URL,
|
||||||
api_url=LLAMA_API_URL,
|
api_key=LLAMA_API_KEY,
|
||||||
api_key=LLAMA_API_KEY,
|
model=LLAMA_MODEL,
|
||||||
model=LLAMA_MODEL,
|
max_tokens=max_tokens,
|
||||||
max_tokens=max_tokens,
|
temperature=temperature,
|
||||||
temperature=temperature,
|
top_p=top_p,
|
||||||
top_p=top_p,
|
disable_thinking=disable_thinking,
|
||||||
disable_thinking=disable_thinking,
|
reasoning_budget=reasoning_budget,
|
||||||
reasoning_budget=reasoning_budget,
|
)
|
||||||
)
|
|
||||||
except Exception:
|
|
||||||
logger.exception("Primary model call failed")
|
|
||||||
result = ""
|
|
||||||
|
|
||||||
# Если основная модель не смогла ответить — пробуем fallback
|
# Если основная модель не смогла ответить — пробуем fallback
|
||||||
if LLAMA_FALLBACK_API_URL and (not result or _CANT_ANSWER_RE.search(result)):
|
if LLAMA_FALLBACK_API_URL and (not result or _CANT_ANSWER_RE.search(result)):
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ def make_time(h: int, m: int) -> time:
|
||||||
return time(hour=h, minute=m)
|
return time(hour=h, minute=m)
|
||||||
|
|
||||||
# Если у тебя наоборот, просто поменяй на False.
|
# Если у тебя наоборот, просто поменяй на False.
|
||||||
UPPER_WEEK_IS_ODD = False
|
UPPER_WEEK_IS_ODD = True
|
||||||
|
|
||||||
PAIR_TIMES = {
|
PAIR_TIMES = {
|
||||||
1: (make_time(8, 0), make_time(9, 35)),
|
1: (make_time(8, 0), make_time(9, 35)),
|
||||||
|
|
@ -150,12 +150,6 @@ LESSON_SCHEDULE = {
|
||||||
4: [
|
4: [
|
||||||
{"pair": None, "title": "Иностранный язык"},
|
{"pair": None, "title": "Иностранный язык"},
|
||||||
],
|
],
|
||||||
# В PR отсутствовали пятница/суббота на нижней неделе — этих пар нет
|
|
||||||
# только в исходном коммите; иняз и философия по субботам идут
|
|
||||||
# независимо от чётности недели, так что дублируем из "upper".
|
|
||||||
5: [
|
|
||||||
{"pair": 1, "title": "Философия (лекция), пр. Новохатько А.Г., MS Teams"},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue