fix #23
This commit is contained in:
parent
1b387cc08d
commit
268e774a1d
|
@ -36,7 +36,7 @@ pip install -r requirements.txt
|
||||||
|
|
||||||
如果您仅希望微调模型的对话能力,而非工具能力,您应该按照以下格式整理数据。
|
如果您仅希望微调模型的对话能力,而非工具能力,您应该按照以下格式整理数据。
|
||||||
|
|
||||||
```
|
```json
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"messages": [
|
"messages": [
|
||||||
|
@ -49,45 +49,47 @@ pip install -r requirements.txt
|
||||||
"args": {
|
"args": {
|
||||||
"<arg name>": "<arg value>"
|
"<arg name>": "<arg value>"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"role": "user",
|
|
||||||
"content": "<user prompt text>"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"role": "assistant",
|
|
||||||
"content": "<assistant response text>"
|
|
||||||
},
|
|
||||||
// If Tool Using:
|
|
||||||
{
|
|
||||||
"role": "user",
|
|
||||||
"content": "<user prompt text>"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"role": "assistant",
|
|
||||||
"content": "<assistant response text>"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"role": "observation",
|
|
||||||
"content": "<observation prompt text>"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"role": "assistant",
|
|
||||||
"content": "<assistant response observation>"
|
|
||||||
},
|
|
||||||
// Multi_turns:
|
|
||||||
{
|
|
||||||
"role": "user",
|
|
||||||
"content": "<user prompt text>"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"role": "assistant",
|
|
||||||
"content": "<assistant response text>"
|
|
||||||
}
|
}
|
||||||
|
// Add more tools if needed
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"role": "user",
|
||||||
|
"content": "<user prompt text>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"role": "assistant",
|
||||||
|
"content": "<assistant response text>"
|
||||||
|
},
|
||||||
|
// If Tool Using
|
||||||
|
{
|
||||||
|
"role": "user",
|
||||||
|
"content": "<user prompt text>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"role": "assistant",
|
||||||
|
"content": "<assistant response text>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"role": "observation",
|
||||||
|
"content": "<observation prompt text>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"role": "assistant",
|
||||||
|
"content": "<assistant response observation>"
|
||||||
|
},
|
||||||
|
// Multi_turns
|
||||||
|
{
|
||||||
|
"role": "user",
|
||||||
|
"content": "<user prompt text>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"role": "assistant",
|
||||||
|
"content": "<assistant response text>"
|
||||||
}
|
}
|
||||||
// ...
|
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
这里是一个不带有工具的例子:
|
这里是一个不带有工具的例子:
|
||||||
|
|
|
@ -32,7 +32,7 @@ The multi-round dialogue fine-tuning example uses the GLM-4 dialogue format conv
|
||||||
|
|
||||||
For data files, the sample uses the following format:
|
For data files, the sample uses the following format:
|
||||||
|
|
||||||
```
|
```json
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"messages": [
|
"messages": [
|
||||||
|
@ -45,45 +45,47 @@ For data files, the sample uses the following format:
|
||||||
"args": {
|
"args": {
|
||||||
"<arg name>": "<arg value>"
|
"<arg name>": "<arg value>"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"role": "user",
|
|
||||||
"content": "<user prompt text>"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"role": "assistant",
|
|
||||||
"content": "<assistant response text>"
|
|
||||||
},
|
|
||||||
// If Tool Using:
|
|
||||||
{
|
|
||||||
"role": "user",
|
|
||||||
"content": "<user prompt text>"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"role": "assistant",
|
|
||||||
"content": "<assistant response text>"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"role": "observation",
|
|
||||||
"content": "<observation prompt text>"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"role": "assistant",
|
|
||||||
"content": "<assistant response observation>"
|
|
||||||
},
|
|
||||||
// Multi_turns:
|
|
||||||
{
|
|
||||||
"role": "user",
|
|
||||||
"content": "<user prompt text>"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"role": "assistant",
|
|
||||||
"content": "<assistant response text>"
|
|
||||||
}
|
}
|
||||||
|
// Add more tools if needed
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"role": "user",
|
||||||
|
"content": "<user prompt text>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"role": "assistant",
|
||||||
|
"content": "<assistant response text>"
|
||||||
|
},
|
||||||
|
// If Tool Using
|
||||||
|
{
|
||||||
|
"role": "user",
|
||||||
|
"content": "<user prompt text>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"role": "assistant",
|
||||||
|
"content": "<assistant response text>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"role": "observation",
|
||||||
|
"content": "<observation prompt text>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"role": "assistant",
|
||||||
|
"content": "<assistant response observation>"
|
||||||
|
},
|
||||||
|
// Multi_turns
|
||||||
|
{
|
||||||
|
"role": "user",
|
||||||
|
"content": "<user prompt text>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"role": "assistant",
|
||||||
|
"content": "<assistant response text>"
|
||||||
}
|
}
|
||||||
// ...
|
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
This is a sample without tools:
|
This is a sample without tools:
|
||||||
|
|
Loading…
Reference in New Issue