fix: check if model returned at least 1 feedback
This commit is contained in:
@ -63,6 +63,10 @@
|
|||||||
error.value = t('invalidStructuredOutput')
|
error.value = t('invalidStructuredOutput')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Check if model returned questions
|
||||||
|
if (!feedback.value.length) {
|
||||||
|
error.value = t('modelFeedback.noQuestions')
|
||||||
|
}
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
console.error('Error getting feedback:', e)
|
console.error('Error getting feedback:', e)
|
||||||
if (e.message.includes('Failed to fetch')) {
|
if (e.message.includes('Failed to fetch')) {
|
||||||
|
@ -53,7 +53,8 @@
|
|||||||
"description": "The AI will ask you some follow up questions to help you clarify the research direction.",
|
"description": "The AI will ask you some follow up questions to help you clarify the research direction.",
|
||||||
"waiting": "Waiting for model feedback...",
|
"waiting": "Waiting for model feedback...",
|
||||||
"submit": "Submit Answer",
|
"submit": "Submit Answer",
|
||||||
"error": "Error getting feedback: {0}"
|
"error": "Error getting feedback: {0}",
|
||||||
|
"noQuestions": "The AI model did not return any follow-up questions."
|
||||||
},
|
},
|
||||||
"webBrowsing": {
|
"webBrowsing": {
|
||||||
"title": "3. Web Browsing",
|
"title": "3. Web Browsing",
|
||||||
|
@ -55,6 +55,7 @@
|
|||||||
"description": "AI 将会跟你确认一些细节,帮助你明确研究方向。",
|
"description": "AI 将会跟你确认一些细节,帮助你明确研究方向。",
|
||||||
"waiting": "等待模型反馈...",
|
"waiting": "等待模型反馈...",
|
||||||
"submit": "提交回答",
|
"submit": "提交回答",
|
||||||
|
"noQuestions": "模型没有返回任何问题,请重试",
|
||||||
"error": "获取反馈失败:{0}"
|
"error": "获取反馈失败:{0}"
|
||||||
},
|
},
|
||||||
"webBrowsing": {
|
"webBrowsing": {
|
||||||
|
Reference in New Issue
Block a user