mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
[FIX] Added handling for the "begin section" in meta_template to APITemplateParser (#1405)
Co-authored-by: leifei <nuuooo@icloud.com>
This commit is contained in:
parent
5a27c2bd6f
commit
a81bbb85bf
@ -281,6 +281,9 @@ class APITemplateParser:
|
|||||||
new_prompt.append(item)
|
new_prompt.append(item)
|
||||||
prompt = new_prompt
|
prompt = new_prompt
|
||||||
|
|
||||||
|
if self.meta_template.get('begin', None):
|
||||||
|
prompt.insert(0, self.meta_template['begin'])
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# in case the model does not have any meta template
|
# in case the model does not have any meta template
|
||||||
prompt = ''
|
prompt = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user