Di Zhang
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -75,9 +75,9 @@ def InternLM2_format(instruction,prompt,answer,history):
|
|
75 |
"{}\n",
|
76 |
"<|Bot|>:\n"
|
77 |
]
|
78 |
-
system = f'{prefix_template[0]}{prefix_template[-1].format(instruction)}'
|
79 |
-
history = "\n".join([f'{prompt_template[0]}{prompt_template[1].format(qa[0])}
|
80 |
-
prompt = f'\n{prompt_template[0]}{prompt_template[1].format(prompt)}
|
81 |
return f"{system}{history}{prompt}"
|
82 |
```
|
83 |
And there is a good example for system prompt,
|
|
|
75 |
"{}\n",
|
76 |
"<|Bot|>:\n"
|
77 |
]
|
78 |
+
system = f'{prefix_template[0]}\n{prefix_template[-1].format(instruction)}\n'
|
79 |
+
history = "\n".join([f'{prompt_template[0]}\n{prompt_template[1].format(qa[0])}{prompt_template[-1]}{qa[1]}' for qa in history])
|
80 |
+
prompt = f'\n{prompt_template[0]}\n{prompt_template[1].format(prompt)}{prompt_template[-1]}'
|
81 |
return f"{system}{history}{prompt}"
|
82 |
```
|
83 |
And there is a good example for system prompt,
|