区分订单状态追问与查货操作说明
This commit is contained in:
@@ -208,7 +208,8 @@ class OrderDataTests(unittest.TestCase):
|
||||
self.events(self.record['inbound_code'], cid)
|
||||
with patch('logistics_chat.ai_client.post_completion') as model:
|
||||
for question in ('查物流', '帮我查一下物流', '物流查询', '帮我查下轨迹', '查一下进度',
|
||||
'我的货到哪了', '这票货什么时候到?', 'Where is my parcel?'):
|
||||
'我的货到哪了', '这票货什么时候到?', '这票状态是什么?', '这个目的仓是什么?',
|
||||
'Where is my parcel?', 'What is my shipment status?'):
|
||||
with self.subTest(question=question):
|
||||
self.assertEqual(self.events(question, cid)[0]['card']['no'], self.record['order_no'])
|
||||
model.assert_not_called()
|
||||
@@ -216,7 +217,7 @@ class OrderDataTests(unittest.TestCase):
|
||||
db.save_message(cid, 'assistant', '海运费用与重量及目的地有关。')
|
||||
self.assertIn('请提供入仓码', self.events('查物流', cid)[0]['t'])
|
||||
for question in ('物流轨迹是什么意思?', '物流查询怎么操作?', '怎么查物流?',
|
||||
'海运一般多久到?', '包裹丢了怎么办?', 'What is parcel tracking?'):
|
||||
'海运一般多久到?', '包裹丢了怎么办?', 'What is parcel tracking?', '入仓码是什么?'):
|
||||
with self.subTest(general_question=question):
|
||||
self.assertIsNone(order_data.answer_query(question, None))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user