Skip to content

Commit 4998c32

Browse files
committed
fix: remove chat prefix in web channel
1 parent fb5fbe7 commit 4998c32

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

channel/web/web_channel.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ def __init__(self):
4949
self.msg_id_counter = 0 # 添加消息ID计数器
5050
self.session_queues = {} # 存储session_id到队列的映射
5151
self.request_to_session = {} # 存储request_id到session_id的映射
52+
# web channel无需前缀
53+
conf()["single_chat_prefix"] = [""]
54+
5255

5356
def _generate_msg_id(self):
5457
"""生成唯一的消息ID"""
@@ -125,7 +128,7 @@ def post_message(self):
125128

126129
# 创建上下文
127130
context = self._compose_context(ContextType.TEXT, prompt, msg=msg)
128-
131+
129132
# 添加必要的字段
130133
context["session_id"] = session_id
131134
context["request_id"] = request_id

0 commit comments

Comments
 (0)