Function
register_template
(template_name, system_format, user_format, assistant_format, system, stop_word=None)
Source from the content-addressed store, hash-verified
| 17 | |
| 18 | |
| 19 | def register_template(template_name, system_format, user_format, assistant_format, system, stop_word=None): |
| 20 | template_dict[template_name] = Template( |
| 21 | template_name=template_name, |
| 22 | system_format=system_format, |
| 23 | user_format=user_format, |
| 24 | assistant_format=assistant_format, |
| 25 | system=system, |
| 26 | stop_word=stop_word, |
| 27 | # stop_token_id=stop_token_id |
| 28 | ) |
| 29 | |
| 30 | |
| 31 | # 注册template |
Tested by
no test coverage detected