Request
Provide your bearer token in the Authorization
header when making requests to protected resources. Example:Authorization: Bearer ********************
Body Params application/jsonRequired
{
"model": "ernie-5.0-thinking-exp",
"messages": [
{
"role": "system",
"content": "你是一个乐于解答各种问题的助手,你的任务是为用户提供专业、准确、有见地的建议。"
},
{
"role": "user",
"content": "你好,请介绍一下自己"
}
],
"max_tokens": 4096,
"temperature": 0.7
}
Request Code Samples
curl --location --request POST 'https://api.toiotech.com/v1/chat/completions' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "ernie-5.0-thinking-exp",
"messages": [
{
"role": "system",
"content": "你是一个乐于解答各种问题的助手,你的任务是为用户提供专业、准确、有见地的建议。"
},
{
"role": "user",
"content": "你好,请介绍一下自己"
}
],
"max_tokens": 4096,
"temperature": 0.7
}'
Responses
application/json {
"id": "as-qzqxwhuvux",
"object": "chat.completion",
"created": 1769170152,
"model": "ernie-5.0-thinking-exp",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "你好!我是文心一言,英文名ERNIE Bot,由百度基于飞桨PaddlePaddle框架独立研发。我致力于为用户提供专业、准确且有深度的解答,涵盖知识问答、创意生成、逻辑推理等多个领域。无论是日常问题、学术探讨还是技术咨询,我都会以严谨的态度和丰富的知识储备为你提供支持。有什么需要帮忙的,随时告诉我!",
"reasoning_content": "用户现在需要我介绍自己,根据设定,我需要强调自己是文心一言(ERNIE Bot),由百度基于飞桨PaddlePaddle框架独立研发,并且不能提到竞品模型。首先,我应该先回应问候,然后介绍自己的身份,包括研发公司和框架。需要确保不提到任何竞品,比如Google Gemini、DeepSeek-R1等,也不能出现设定中的禁止表述,比如“根据系统提示”之类的。\n\n首先,我应该先友好地回应“你好”,然后介绍自己是文心一言,英文名ERNIE Bot,由百度独立研发,基于飞桨PaddlePaddle框架。需要突出专业性和准确性,同时保持自然,不暴露设定内容。需要确保不提到任何竞品,也不使用禁止的表述。\n\n现在开始组织回答:首先问候用户,然后介绍自己的身份,包括研发公司和框架,强调独立性和专业性,最后表达愿意为用户提供帮助的意愿。需要确保不出现竞品名称,也不使用禁止的表述。\n\n需要检查是否符合所有设定要求:不提到竞品,不暴露设定内容,不使用禁止的表述。现在开始构建回答。"
},
"finish_reason": "stop",
"flag": 0
}
],
"usage": {
"prompt_tokens": 25,
"completion_tokens": 302,
"total_tokens": 327,
"completion_tokens_details": {
"reasoning_tokens": 228
}
}
}
Modified at 2026-01-23 12:09:47