Compare commits

...

7 commits

Author SHA1 Message Date
zovos
8a9ba990a9 fix: sync Saturday teacher name after merging PR #40 typo fixes
Our manually-added lower-week Saturday entry (missing from PR #39/#40
upstream) still had the old "Новосёлова" spelling; PR #40 fixed it to
"Новохатько" everywhere else but couldn't touch an entry that didn't
exist in its diff.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-03 05:37:56 +00:00
zovos
9a0256cc5c Merge remote-tracking branch 'origin/main' 2026-09-03 05:37:31 +00:00
zovos
e3c6e1a4df Merge remote-tracking branch 'origin/main' into main
Resolve config.py conflict by taking Danil's PR #39 schedule content
(teacher names/rooms, per-week Thursday split) as the source of truth,
per explicit user decision, with two fixes on top:
- UPPER_WEEK_IS_ODD restored to False (current ISO-even week is upper,
  confirmed by the user)
- added the missing Saturday entry under LESSON_SCHEDULE["lower"]
  (PR #39 only defined it under "upper", which would have silently
  dropped the Saturday philosophy lecture on lower weeks)
2026-09-02 15:39:13 +00:00
zovos
5b025a7cc9 fix: derive /break timing table from the actual lesson schedule
The old SCHEDULE dict was hand-written for a previous timetable and
never got updated when LESSON_SCHEDULE changed, so Wednesday (day=2)
was left empty ("Сегодня кайфуем дома, перекур не нужен") even though
the new schedule has 4 lessons that day. SCHEDULE is now generated
from the pairs actually present in _LESSON_WEEK plus PAIR_TIMES, so it
can't drift out of sync again.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-02 11:35:10 +00:00
zovos
47ef30800f fix: fall back to secondary LLM when the primary call raises
Primary model errors (HTTP 4xx/5xx, connection failures) raised out of
_call_llm uncaught, skipping the fallback branch entirely — fallback
only ran when the primary returned an empty/"can't answer" string.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-02 11:32:46 +00:00
zovos
0cfa67e85f fix: flip week parity so ISO-even weeks are upper
Current week (36, even) is actually an upper week per the user, not
lower as the old flag implied.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-31 08:59:35 +00:00
zovos
49e38ba276 feat: update lesson schedule for 2 course group 27, fall 2026-27
Replace placeholder LESSON_SCHEDULE with actual timetable from
schedule_2_27.json (25ВТ-09.03.03.01-о2), incl. subgroup splits on
Wed/Thu and a Saturday entry.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-31 08:26:04 +00:00
2 changed files with 22 additions and 12 deletions

View file

@ -614,17 +614,21 @@ async def _call_llm(
) -> str:
disable_thinking = FORCE_DISABLE_THINKING if disable_thinking is None else disable_thinking
result = await _call_single_model(
messages,
api_url=LLAMA_API_URL,
api_key=LLAMA_API_KEY,
model=LLAMA_MODEL,
max_tokens=max_tokens,
temperature=temperature,
top_p=top_p,
disable_thinking=disable_thinking,
reasoning_budget=reasoning_budget,
)
try:
result = await _call_single_model(
messages,
api_url=LLAMA_API_URL,
api_key=LLAMA_API_KEY,
model=LLAMA_MODEL,
max_tokens=max_tokens,
temperature=temperature,
top_p=top_p,
disable_thinking=disable_thinking,
reasoning_budget=reasoning_budget,
)
except Exception:
logger.exception("Primary model call failed")
result = ""
# Если основная модель не смогла ответить — пробуем fallback
if LLAMA_FALLBACK_API_URL and (not result or _CANT_ANSWER_RE.search(result)):

View file

@ -77,7 +77,7 @@ def make_time(h: int, m: int) -> time:
return time(hour=h, minute=m)
# Если у тебя наоборот, просто поменяй на False.
UPPER_WEEK_IS_ODD = True
UPPER_WEEK_IS_ODD = False
PAIR_TIMES = {
1: (make_time(8, 0), make_time(9, 35)),
@ -150,6 +150,12 @@ LESSON_SCHEDULE = {
4: [
{"pair": None, "title": "Иностранный язык"},
],
# В PR отсутствовали пятница/суббота на нижней неделе — этих пар нет
# только в исходном коммите; иняз и философия по субботам идут
# независимо от чётности недели, так что дублируем из "upper".
5: [
{"pair": 1, "title": "Философия (лекция), пр. Новохатько А.Г., MS Teams"},
],
},
}