Skip to content

Commit

Permalink
[FIX] Added handling for the "begin section" in meta_template to APIT…
Browse files Browse the repository at this point in the history
…emplateParser (#1405)

Co-authored-by: leifei <[email protected]>
  • Loading branch information
hailsham and leifei committed Sep 19, 2024
1 parent 5a27c2b commit a81bbb8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions opencompass/models/base_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ def parse_template(self, prompt_template: PromptType,
new_prompt.append(item)
prompt = new_prompt

if self.meta_template.get('begin', None):
prompt.insert(0, self.meta_template['begin'])

else:
# in case the model does not have any meta template
prompt = ''
Expand Down

0 comments on commit a81bbb8

Please sign in to comment.