文本生成
阿里云百炼文本生成适合聊天、写作、总结、改写、分类、抽取、客服回复和知识库问答。
基础文本生成
json
{
"model": "qwen-plus-latest",
"messages": [
{ "role": "user", "content": "Write a product description in fewer than 100 words" }
]
}长文本总结
json
{
"model": "qwen-plus-latest",
"messages": [
{
"role": "system",
"content": "You are a document summarization assistant. Preserve key facts, amounts, dates, responsible parties, and risks."
},
{
"role": "user",
"content": "Summarize the following contract content: ..."
}
]
}分类与抽取
json
{
"model": "qwen-plus-latest",
"temperature": 0,
"messages": [
{
"role": "user",
"content": "Classify the text as complaint, inquiry, or praise. Text: I paid, but the order has not arrived."
}
]
}控制语气和格式
text
Answer in an enterprise support tone. Be polite and concise, and do not promise unverified information.最佳实践
- 普通文本任务优先用
qwen-plus-latest - 批量分类任务降低
temperature - 长文档先切分再总结
- 输出 JSON 时配合服务端校验
- 搜索和思考类参数不要默认全部开启