已合并
docs: align agentic SFT data example with qwen3omni format #3017
docs: align agentic SFT data example with qwen3omni format #3017
已合并
Hi_Archer创建于 8月19日
共 2 个文件变更+78-38
@@ -57,43 +57,83 @@ Agentic SFT数据采用JSON格式,每条数据包含以下关键字段:
57## 完整数据示例57## 完整数据示例
58 58 
59```json59```json
60-[60+{
61- {61+ "messages": [
62- "messages": [62+ {
63- {"role": "system", "content": "你是一名专业、高效的AI智能客服。当前对话的时间为: 2024年06月15日 14时30分00秒 (今天是星期六)。"},63+ "role": "system",
64- {"role": "user", "content": "您好,在不在<audio>"},64+ "content": "你是一名专业、高效的AI智能客服。当前对话的时间为: 2024年06月15日 14时30分00秒 (今天是星期六)。"
65- {"role": "assistant", "content": "您好,请问是杜女士吗?"},65+ },
66- {"role": "user", "content": "您好,是的,我是杜女士。"},66+ {
67- {"role": "assistant", "content": "杜女士,感谢您的确认。我是疾控中心的工作人员。我们注意到您还没有接种新型流感疫苗。为了您的健康和公共卫生安全,我们建议您尽快接种。"},67+ "role": "user",
68- {"role": "user", "content": "那我选择周三下午三点可以吗?"},68+ "content": "您好,在不在<audio>"
69- {"role": "tool_call", "content": "<tool_call>\n{name: register_vaccine_appointment, arguments: {appointment_time: 周三下午三点}}\n</tool_call>"},69+ },
70- {"role": "tool_response", "content": "{status: success, message: 预约成功}"},70+ {
71- {"role": "assistant", "content": "好的,已经为您登记了周三下午三点的接种时间。请您携带有效身份证件按时前往指定接种点。感谢您对疫情防控工作的支持。"},71+ "role": "assistant",
72- {"role": "user", "content": "谢谢您,辛苦了。"},72+ "content": "您好,请问是杜女士吗?"
73- {"role": "assistant", "content": "不客气,这是我们的职责。祝您健康,再见。"}73+ },
74- ],74+ {
75- "audios": "/speeches/7_Katerina.wav",75+ "role": "user",
76- "tools": [76+ "content": "您好,是的,我是杜女士。"
77- {77+ },
78- "type": "function",78+ {
79- "function": {79+ "role": "assistant",
80- "name": "register_vaccine_appointment",80+ "content": "杜女士,感谢您的确认。我是疾控中心的工作人员。我们注意到您还没有接种新型流感疫苗。为了您的健康和公共卫生安全,我们建议您尽快接种。"
81- "description": "登记用户的疫苗接种预约",81+ },
82- "parameters": {82+ {
83- "type": "object",83+ "role": "user",
84- "properties": {84+ "content": "我现在身体状况挺好的,暂时不想接种疫苗。"
85- "appointment_time": {85+ },
86- "type": "string",86+ {
87- "description": "用户选择的接种时间"87+ "role": "assistant",
88- }88+ "content": "理解您的顾虑,但接种疫苗不仅能有效预防感染,还能保护您和周围人的健康。特别是在当前疫情环境下,接种疫苗是非常重要的。"
89- },89+ },
90- "required": ["appointment_time"]90+ {
91- }91+ "role": "user",
92- }92+ "content": "我担心接种后会有不良反应,真的安全吗?"
93- }93+ },
94- ]94+ {
95- }95+ "role": "assistant",
96-]96+ "content": "您的担忧是可以理解的。新型流感疫苗经过严格的安全性测试,具有较高的安全性。接种后可能会有轻微的不适,但大多数人都能顺利度过。此外,接种后我们会要求您留观30分钟,以确保及时处理任何不良反应。"
97+ },
98+ {
99+ "role": "user",
100+ "content": "好吧,听您这么说,我同意接种疫苗。"
101+ },
102+ {
103+ "role": "assistant",
104+ "content": "非常感谢您的理解和支持。我们提供的接种时间是周一到周六,每天早上九点到十二点,下午两点到晚上九点。您可以选择一个方便的时间来接种。"
105+ },
106+ {
107+ "role": "user",
108+ "content": "那我选择周三下午三点可以吗?"
109+ },
110+ {
111+ "role": "tool_call",
112+ "content": "<tool_call>\n{\"name\": \"register_vaccine_appointment\", \"arguments\": {\"appointment_time\": \"周三下午三点\"}}\n</tool_call>"
113+ },
114+ {
115+ "role": "tool_response",
116+ "content": "{\"status\": \"success\", \"message\": \"预约成功\"}"
117+ },
118+ {
119+ "role": "assistant",
120+ "content": "好的,已经为您登记了周三下午三点的接种时间。请您携带有效身份证件按时前往指定接种点。感谢您对疫情防控工作的支持。"
121+ },
122+ {
123+ "role": "user",
124+ "content": "谢谢您,辛苦了。"
125+ },
126+ {
127+ "role": "assistant",
128+ "content": "不客气,这是我们的职责。祝您健康,再见。",
129+ "id": "客服.礼貌结束"
130+ }
131+ ],
132+ "audios": "/speeches/7_Katerina.wav",
133+ "tools": [
134+ "{\"type\": \"function\", \"function\": {\"name\": \"register_vaccine_appointment\", \"description\": \"登记用户的疫苗接种预约\", \"parameters\": {\"type\": \"object\", \"properties\": {\"appointment_time\": {\"type\": \"string\", \"description\": \"用户选择的接种时间\"}}, \"required\": [\"appointment_time\"]}}}"
135+ ]
136+}
97```137```
98 138 
99## 配置说明139## 配置说明
@@ -466,7 +466,7 @@ bash examples/qwen3omni/finetune_qwen3omni.sh
466 },466 },
467 {467 {
468 "role": "user",468 "role": "user",
469- "content": "您好,在不在"469+ "content": "您好,在不在<audio>"
470 },470 },
471 {471 {
472 "role": "assistant",472 "role": "assistant",