fix: show knowledge excerpts when Gemma abstains
This commit is contained in:
@@ -255,6 +255,7 @@ class AgentSkillTests(unittest.TestCase):
|
||||
"text": "The SQLite migration adds selected_version to old messages and preserves saved assistant answer versions.",
|
||||
}
|
||||
refusal = "لم يتم العثور على مقاطع تجيب مباشرة على السؤال في فهرس المعرفة المحلي."
|
||||
live_refusal = 'لا يوجد مقطع في فهرس المعرفة المحلي يجيب مباشرة على السؤال "How are old conversation answers migrated?".'
|
||||
with (
|
||||
patch(
|
||||
"app.main._search_local_knowledge",
|
||||
@@ -280,6 +281,7 @@ class AgentSkillTests(unittest.TestCase):
|
||||
|
||||
citation_only = "المقطع `routing.md`, المقطع 0."
|
||||
self.assertTrue(_is_knowledge_answer_insufficient(refusal))
|
||||
self.assertTrue(_is_knowledge_answer_insufficient(live_refusal))
|
||||
self.assertTrue(_is_knowledge_answer_insufficient(citation_only))
|
||||
self.assertFalse(_is_knowledge_answer_insufficient("تضيف الهجرة selected_version."))
|
||||
self.assertIn("لم يصغ النموذج جوابًا كافيًا رغم وجود نتائج", result["result"])
|
||||
|
||||
Reference in New Issue
Block a user