Skip to content

Commit

Permalink
Add tool role for langchain usage (#2558)
Browse files Browse the repository at this point in the history
  • Loading branch information
AllentDan authored Oct 9, 2024
1 parent 7c6b107 commit c722ff5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lmdeploy/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -838,10 +838,12 @@ def messages2prompt(self,
return self.get_prompt(messages, sequence_start)
box_map = dict(user=self.user,
ipython=self.ipython,
tool=self.ipython,
assistant=self.assistant,
system=self.system)
eox_map = dict(user=self.eoh,
ipython=self.eoi,
tool=self.eoi,
assistant=self.eoa + self.separator,
system=self.eosys)
ret = ''
Expand Down

0 comments on commit c722ff5

Please sign in to comment.