fix: check if model returned at least 1 feedback

This commit is contained in:
AnotiaWang
2025-02-14 17:16:16 +08:00
parent e15e35e5dd
commit 8c36e5728a
3 changed files with 7 additions and 1 deletions

View File

@ -63,6 +63,10 @@
error.value = t('invalidStructuredOutput')
}
}
// Check if model returned questions
if (!feedback.value.length) {
error.value = t('modelFeedback.noQuestions')
}
} catch (e: any) {
console.error('Error getting feedback:', e)
if (e.message.includes('Failed to fetch')) {