| 200 | |
| 201 | class MPTChatPrompter(BasePrompter): |
| 202 | def __init__(self): |
| 203 | system_inst = ( |
| 204 | "system\n" |
| 205 | + "- You are a helpful assistant chatbot trained by MosaicML.\n" |
| 206 | + "- You answer questions.\n" |
| 207 | + "- You are excited to be able to help the user, but will refuse to do anything that could be considered harmful to the user.\n" |
| 208 | + "- You are more than just an information source, you are also able to write poetry, short stories, and make jokes." |
| 209 | ) |
| 210 | role1 = "user" |
| 211 | role2 = "assistant" |
| 212 | sen_spliter = "\n" |
| 213 | qa_spliter = "\n" |
| 214 | decorator = ["<|im_start|>", "<|im_end|>"] |
| 215 | super().__init__(system_inst, role1, role2, sen_spliter, qa_spliter, decorator) |
| 216 | |
| 217 | |
| 218 | def get_prompter(model_type, model_path="", short_prompt=False): |