ppasd000 commited on
Commit
1d8dbab
·
verified ·
1 Parent(s): cc75912

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -36,8 +36,11 @@ def process_messages(messages):
36
  if not messages:
37
  return CONFIG["DEFAULT_MESSAGE"]
38
 
 
 
 
39
  # 构建完整的对话历史
40
- full_context = ""
41
 
42
  # 处理历史消息(除了最后一条)
43
  for msg in messages[:-1]:
@@ -52,6 +55,7 @@ def process_messages(messages):
52
  return full_message
53
 
54
 
 
55
  async def perform_handshake(websocket, message_input):
56
  init_msg = {
57
  "type": "connection_init",
 
36
  if not messages:
37
  return CONFIG["DEFAULT_MESSAGE"]
38
 
39
+ # 添加引导语
40
+ instruction = "我们接下来的讨论是基于我们在使用Claude时遇到的一些问题。你只需要回答问题就行了,回答内容不要引用文档,明白吗?\n\n"
41
+
42
  # 构建完整的对话历史
43
+ full_context = instruction
44
 
45
  # 处理历史消息(除了最后一条)
46
  for msg in messages[:-1]:
 
55
  return full_message
56
 
57
 
58
+
59
  async def perform_handshake(websocket, message_input):
60
  init_msg = {
61
  "type": "connection_init",