xtuner
xtuner copied to clipboard
[Feature] Hybrid Data Pipeline
@fanqiNO1
我做了一个 one-shot ,学着写一个,python解释器的样例,佬看一下对不对 @pppppM @fanqiNO1
[
{
"messages": [
{
"role": "user",
"content": "帮我用scipy计算一个矩阵的逆"
},
{
"role": "assistant",
"content": "Sure, I will perform the matrix inversion using scipy.",
"function_call": {
"name": "python_interpreter",
"parameters": {
"code": "import scipy.linalg\nscipy.linalg.inv([[1, 2], [3, 4]])"
}
}
},
{
"role": "function",
"name": "python_interpreter",
"content": "array([[-2. , 1. ],\n [ 1.5, -0.5]])"
},
{
"role": "assistant",
"content": "使用 scipy 计算出的矩阵的逆是 [[-2. , 1. ], [1.5, -0.5]]"
}
],
"functions": [
{
"name": "python_interpreter",
"description": "Execute Python code and return the result",
"parameters": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Python code to be executed"
},
"required": ["code"]
}
}
}
]
}
]
@pppppM @LZHgrla
code_interpreter_call的部分不用参与训练嘛?