Skip to content

Commit

Permalink
fix bug for online chat formatter (#24)
Browse files Browse the repository at this point in the history
Co-authored-by: wangjian <[email protected]>
  • Loading branch information
wangjian052163 and wangjian authored Jun 21, 2024
1 parent 4216202 commit d7ac613
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lazyllm/components/prompter/builtinPrompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def _generate_prompt_dict_impl(self, instruction, input, user, history, tools, l
raise TypeError("input must be a string or a dict")

if user:
history[-1]["content"].insert(0, user)
history[-1]["content"] = user + history[-1]['content']

history.insert(0, {"role": "system",
"content": self._system + "\n" + instruction if instruction else self._system})
Expand Down

0 comments on commit d7ac613

Please sign in to comment.