feat: персональные AI модели, оптимизация задач, фильтрация словаря
- Добавлена поддержка персональных AI моделей для каждого пользователя - Оптимизация создания заданий: батч-запрос к AI вместо N запросов - Фильтрация слов по языку изучения (source_lang) в словаре - Удалены неиспользуемые колонки examples и category из vocabulary - Миграции для ai_model_id и удаления колонок 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -56,7 +56,7 @@ async def process_word_addition(message: Message, state: FSMContext, word: str):
|
||||
return
|
||||
|
||||
# Проверяем, есть ли уже такое слово
|
||||
existing_word = await VocabularyService.find_word(session, user.id, word)
|
||||
existing_word = await VocabularyService.find_word(session, user.id, word, source_lang=user.learning_language)
|
||||
if existing_word:
|
||||
lang = get_user_lang(user)
|
||||
await message.answer(t(lang, 'add.exists', word=word, translation=existing_word.word_translation))
|
||||
@@ -107,7 +107,6 @@ async def process_word_addition(message: Message, state: FSMContext, word: str):
|
||||
card_text = (
|
||||
f"📝 <b>{word_data['word']}</b>\n"
|
||||
f"🔊 [{word_data.get('transcription', '')}]\n\n"
|
||||
f"{t(lang, 'add.category_label')}: {word_data.get('category', '')}\n"
|
||||
f"{t(lang, 'add.level_label')}: {word_data.get('difficulty', 'A1')}"
|
||||
f"{translations_text}"
|
||||
f"{t(lang, 'add.confirm_question')}"
|
||||
@@ -153,7 +152,6 @@ async def confirm_add_word(callback: CallbackQuery, state: FSMContext):
|
||||
source_lang=source_lang,
|
||||
translation_lang=translation_lang,
|
||||
transcription=word_data.get("transcription"),
|
||||
category=word_data.get("category"),
|
||||
difficulty_level=word_data.get("difficulty"),
|
||||
source=WordSource.MANUAL
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user