Skip to content

Commit bf5c8f3

Browse files
committed
fix: correct variable references in chat message constructor
1 parent 33e9596 commit bf5c8f3

File tree

1 file changed

+2
-2
lines changed
  • framework/workflow/implementations/blocks/llm

1 file changed

+2
-2
lines changed

framework/workflow/implementations/blocks/llm/chat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ def execute(self, user_msg: IMMessage, memory_content: str, system_prompt_format
6363
executor = self.container.resolve(WorkflowExecutor)
6464

6565
# 先替换自有的两个变量
66-
system_prompt_format = self.system_prompt_format.replace("{user_msg}", user_msg.content)
66+
system_prompt_format = system_prompt_format.replace("{user_msg}", user_msg.content)
6767
system_prompt_format = system_prompt_format.replace("{user_name}", user_msg.sender.display_name)
6868
system_prompt_format = system_prompt_format.replace("{memory_content}", memory_content)
6969

70-
user_prompt_format = self.user_prompt_format.replace("{user_msg}", user_msg.content)
70+
user_prompt_format = user_prompt_format.replace("{user_msg}", user_msg.content)
7171
user_prompt_format = user_prompt_format.replace("{user_name}", user_msg.sender.display_name)
7272
user_prompt_format = user_prompt_format.replace("{memory_content}", memory_content)
7373

0 commit comments

Comments
 (0)