From 27ca728af8185fc6b27f3d797bd78a6d61e5b30f Mon Sep 17 00:00:00 2001 From: Bagus Indrayana Date: Tue, 11 Jul 2023 23:05:15 +0800 Subject: check multiple messages --- testing/binghuan/helpers/binghuan.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'testing/binghuan/helpers/binghuan.py') diff --git a/testing/binghuan/helpers/binghuan.py b/testing/binghuan/helpers/binghuan.py index cdeabeb8..2aabc4b6 100644 --- a/testing/binghuan/helpers/binghuan.py +++ b/testing/binghuan/helpers/binghuan.py @@ -207,7 +207,9 @@ def convert(messages): return context async def run(optionSets, messages): - prompt = convert(messages) + prompt = messages[-1]['content'] + if(len(messages) > 1): + prompt = convert(messages) async for value in AsyncCompletion.create(prompt=prompt, optionSets=optionSets): -- cgit v1.2.3