Skip to content

Commit c51bbc9

Browse files
committed
fix: update SystemMessage content assignment in base_chat_step
--bug=1069054@tapd-62980211 --user=刘瑞斌 【简易应用】长期记忆功能中提示词{memory}没有被替换成记忆 https://www.tapd.cn/62980211/s/1916885
1 parent 3205272 commit c51bbc9

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

apps/application/chat_pipeline/step/chat_step/impl/base_chat_step.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@ def get_stream_result(self, message_list: List[BaseMessage],
392392
if isinstance(msg, SystemMessage):
393393
if isinstance(msg.content, str):
394394
user_system_prompt = msg.content.replace('{memory}', memory)
395+
msg.content = user_system_prompt
395396
elif isinstance(msg.content, list):
396397
user_system_prompt = ''.join(
397398
item.get('text', '') if isinstance(item, dict) else str(item)

0 commit comments

Comments
 (0)