From 00281b8243002f5c4d8b801cbfc6f36b86b0b595 Mon Sep 17 00:00:00 2001 From: jstzwj <1103870790@qq.com> Date: Thu, 28 Dec 2023 01:57:39 +0800 Subject: [PATCH] add colon two bug fix --- chatproto/conversation/history.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chatproto/conversation/history.py b/chatproto/conversation/history.py index 9a35b73..a139014 100644 --- a/chatproto/conversation/history.py +++ b/chatproto/conversation/history.py @@ -37,7 +37,7 @@ def create_add_colon_two(settings: ConversationSettings, system: Optional[str], for i, (role, message) in enumerate(messages): if message: section = role + ": " + message + seps[i % 2] - prefix = ret + ": " + prefix = ret + role + ": " indices.append((len(prefix), len(prefix) + len(message))) else: section = role + ":"