名称 | 描述 |
---|---|
error_code | 错误码 |
error_msg | 错误描述信息,帮助理解和解决发生的错误 |
{
"error_code": 110,
"error_msg": "Access token invalid or no longer valid"
}
curl --location --request POST 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/completions/?access_token =' \
--header 'Content-Type: application/json' \
--data-raw '{
"prompt": "string",
"stream": true,
"temperature\t": 0,
"top_k\t": 0,
"top_p\t": 0,
"penalty_score": 0,
"stop\t": [
"string"
],
"user_id": "string"
}'
{
"id": "as-rq3wwusja8",
"object": "completion",
"created": 1693811110,
"result": "# python计算数组最大值和最小值的函数\ndef max_min(a):\n return a.max(), a.min()\n",
"is_safe": 1,
"usage": {
"prompt_tokens": 5,
"completion_tokens": 92,
"total_tokens": 97
}
}