File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
src/server/api/memobase_server Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ async def get_user_context(
112112 if not p .ok ():
113113 return p
114114 user_events = p .data ()
115- event_section = "\n --- \n " .join ([event_str_repr (ed ) for ed in user_events .events ])
115+ event_section = "\n " .join ([event_str_repr (ed ) for ed in user_events .events ])
116116 event_section_tokens = len (get_encoded_tokens (event_section ))
117117 LOG .info (
118118 f"Retrived { len (use_profiles )} profiles({ profile_section_tokens } tokens), { len (user_events .events )} events({ event_section_tokens } tokens)"
Original file line number Diff line number Diff line change 66def en_context_prompt (profile_section : str , event_section : str ) -> str :
77 return f"""---
88# Memory
9+ Unless the user has relevant queries, do not actively mention those memories in the conversation.
910## User Background:
1011{ profile_section }
1112
1213## Latest Events:
1314{ event_section }
14-
15- Unless the user has relevant queries, do not actively mention those memories in the conversation.
1615---
1716"""
1817
1918
2019def zh_context_prompt (profile_section : str , event_section : str ) -> str :
2120 return f"""---
2221# 记忆
22+ 除非用户有相关的需求,否则不要主动在对话中提到这些记忆.
2323## 用户背景:
2424{ profile_section }
2525
26- ## 部分过去事件 :
26+ ## 过去事件 :
2727{ event_section }
28-
29- 除非用户有相关的需求,否则不要主动在对话中提到这些记忆.
3028---
3129"""
3230
You can’t perform that action at this time.
0 commit comments