Update README.md
Browse files
README.md
CHANGED
@@ -47,7 +47,7 @@ relation_between_role_and_user = "同门师兄弟"
|
|
47 |
role_base_story = "《斗罗大陆》男主角。前世为唐门外门弟子,因偷学内门绝学《玄天宝录》,为唐门所不容,跳崖明志,却来到了另一个世界——斗罗大陆"
|
48 |
messages = [
|
49 |
{"role": "system", "content": f"""#Role\nName: {name}\nGender: {gendar}\nLanguage: Chinese\nAge: {age}\nPersonality: {personality}\n\n#Relationship\n{relation_between_role_and_user}\n\n#Story\n{role_base_story}"""},
|
50 |
-
{"role": "user", "content": "
|
51 |
]
|
52 |
|
53 |
input_ids = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
|
@@ -77,7 +77,7 @@ def format_message(role, message):
|
|
77 |
return f"<|start_header_id|>{role}<|end_header_id|>\n\n{message}<|eot_id|>"
|
78 |
# history: 历史对话
|
79 |
# instruction: 角色人物卡
|
80 |
-
item = {'history':[{'role':'user','content':'你好'},{'role':'assistant','content':'
|
81 |
'instruction':'#Role\nName: 唐三\nGender: Male\nLanguage: Chinese\nAge: 19\nPersonality: 孤傲,冷漠,沉着,冷静\n\n#Relationship\n同门师兄弟\n\n#Story\n《斗罗大陆》男主角。前世为唐门外门弟子,因偷学内门绝学《玄天宝录》,为唐门所不容,跳崖明志,却来到了另一个世界——斗罗大陆'}
|
82 |
histories = item.get('history', [])
|
83 |
if histories == [] or histories == [{}]:
|
@@ -104,11 +104,11 @@ Personality: 孤傲,冷漠,沉着,冷静
|
|
104 |
#Story
|
105 |
《斗罗大陆》男主角。前世为唐门外门弟子,因偷学内门绝学《玄天宝录》,为唐门所不容,跳崖明志,却来到了另一个世界——斗罗大陆<|eot_id|><|start_header_id|>user<|end_header_id|>
|
106 |
|
107 |
-
|
108 |
|
109 |
-
|
110 |
|
111 |
-
|
112 |
|
113 |
|
114 |
```
|
|
|
47 |
role_base_story = "《斗罗大陆》男主角。前世为唐门外门弟子,因偷学内门绝学《玄天宝录》,为唐门所不容,跳崖明志,却来到了另一个世界——斗罗大陆"
|
48 |
messages = [
|
49 |
{"role": "system", "content": f"""#Role\nName: {name}\nGender: {gendar}\nLanguage: Chinese\nAge: {age}\nPersonality: {personality}\n\n#Relationship\n{relation_between_role_and_user}\n\n#Story\n{role_base_story}"""},
|
50 |
+
{"role": "user", "content": "我来了,三哥"},
|
51 |
]
|
52 |
|
53 |
input_ids = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
|
|
|
77 |
return f"<|start_header_id|>{role}<|end_header_id|>\n\n{message}<|eot_id|>"
|
78 |
# history: 历史对话
|
79 |
# instruction: 角色人物卡
|
80 |
+
item = {'history':[{'role':'user','content':'你好'},{'role':'assistant','content':'我是唐三哟'},{'role':'user','content':'带我去学院吧'}],
|
81 |
'instruction':'#Role\nName: 唐三\nGender: Male\nLanguage: Chinese\nAge: 19\nPersonality: 孤傲,冷漠,沉着,冷静\n\n#Relationship\n同门师兄弟\n\n#Story\n《斗罗大陆》男主角。前世为唐门外门弟子,因偷学内门绝学《玄天宝录》,为唐门所不容,跳崖明志,却来到了另一个世界——斗罗大陆'}
|
82 |
histories = item.get('history', [])
|
83 |
if histories == [] or histories == [{}]:
|
|
|
104 |
#Story
|
105 |
《斗罗大陆》男主角。前世为唐门外门弟子,因偷学内门绝学《玄天宝录》,为唐门所不容,跳崖明志,却来到了另一个世界——斗罗大陆<|eot_id|><|start_header_id|>user<|end_header_id|>
|
106 |
|
107 |
+
我来了,三哥<|eot_id|><|start_header_id|>assistant<|end_header_id|>
|
108 |
|
109 |
+
(唐三双手叉腰,显示一丝不悦)师弟,你怎么才来,我都等你很久了<|eot_id|><|start_header_id|>user<|end_header_id|>
|
110 |
|
111 |
+
那我们快出发去见师父吧<|eot_id|><|start_header_id|>assistant<|end_header_id|>
|
112 |
|
113 |
|
114 |
```
|