Category: provider
Model Studio Qwen Text Generation
Validation
CODEBLOCK0
Pass criteria: command exits 0 and output/aliyun-qwen-generation/validate.txt is generated.
Output And Evidence
- Save prompt templates, normalized request payloads, and response summaries under output/aliyun-qwen-generation/. Keep one reproducible request example with model name, region, and key parameters.
Use this skill for general text generation, reasoning, tool-calling, and long-context chat on Alibaba Cloud Model Studio.
Critical model names
Prefer the current flagship families:
- INLINECODE2 INLINECODE3 INLINECODE4 INLINECODE5 INLINECODE6 INLINECODE7
Common related variants listed in the official model catalog:
- INLINECODE8 INLINECODE9 INLINECODE10 INLINECODE11
Prerequisites
- Install SDK in a virtual environment:
CODEBLOCK1
- Set DASHSCOPE_API_KEY in your environment, or add dashscope_api_key to ~/.alibabacloud/credentials.
Normalized interface (text.generate)
Request
- messages (array, required): standard chat turns. INLINECODE16 (string, optional): default qwen3.5-plus. INLINECODE18 (number, optional) INLINECODE19 (number, optional) INLINECODE20 (int, optional) INLINECODE21 (bool, optional) INLINECODE22 (array, optional) INLINECODE23 (object, optional) INLINECODE24 (bool, optional)
Response
- text (string): assistant output. INLINECODE26 (string, optional) INLINECODE27 (object, optional) INLINECODE28 (object, optional)
Quick start (OpenAI-compatible endpoint)
CODEBLOCK2
Local helper script
CODEBLOCK3
Operational guidance
- Use snapshot IDs when reproducibility matters. Prefer qwen3.5-flash for lower-latency simple tasks and qwen3-max for harder multi-step tasks. Keep tool schemas minimal and explicit when enabling tool calls. For multimodal input, route to dedicated VL or Omni skills unless the task is primarily text-centric.
Output location
- Default output: INLINECODE31 Override base dir with OUTPUT_DIR.
References
技能名称:aliyun-qwen-generation
详细描述:
类别:provider
Model Studio Qwen 文本生成
验证
bash
mkdir -p output/aliyun-qwen-generation
python -m pycompile skills/ai/text/aliyun-qwen-generation/scripts/prepare generationrequest.py && echo py compile_ok > output/aliyun-qwen-generation/validate.txt
通过标准:命令退出码为 0 且 output/aliyun-qwen-generation/validate.txt 已生成。
输出与证据
- 将提示模板、标准化请求负载和响应摘要保存到 output/aliyun-qwen-generation/ 目录下。 保留一个包含模型名称、区域和关键参数的可复现请求示例。
使用此技能在阿里云 Model Studio 上进行通用文本生成、推理、工具调用和长上下文对话。
关键模型名称
优先使用当前旗舰系列:
- qwen3-max qwen3-max-2026-01-23 qwen3.5-plus qwen3.5-plus-2026-02-15 qwen3.5-flash qwen3.5-flash-2026-02-23
官方模型目录中列出的常见相关变体:
- qwen3.5-397b-a17b qwen3.5-122b-a10b qwen3.5-35b-a3b qwen3.5-27b
前置条件
bash
python3 -m venv .venv
. .venv/bin/activate
python -m pip install dashscope
- 在环境中设置 DASHSCOPEAPI KEY,或将 dashscopeapi key 添加到 ~/.alibabacloud/credentials 文件中。
标准化接口(text.generate)
请求
- messages(数组<对象>,必填):标准对话轮次。 model(字符串,可选):默认为 qwen3.5-plus。 temperature(数字,可选) topp(数字,可选) maxtokens(整数,可选) enablethinking(布尔值,可选) tools(数组<对象>,可选) responseformat(对象,可选) stream(布尔值,可选)
响应
- text(字符串):助手输出。 finish_reason(字符串,可选) usage(对象,可选) raw(对象,可选)
快速开始(兼容 OpenAI 的端点)
bash
curl -sS https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions \
-H Authorization: Bearer $DASHSCOPEAPI KEY \
-H Content-Type: application/json \
-d {
model: qwen3.5-plus,
messages: [
{role: system, content: 你是一个简洁的助手。},
{role: user, content: 总结为什么对象存储有助于媒体处理管道。}
],
stream: false
}
本地辅助脚本
bash
python skills/ai/text/aliyun-qwen-generation/scripts/preparegeneration request.py \
--prompt 草拟一份媒体摄取管道的简洁架构摘要。 \
--model qwen3.5-plus
操作指南
- 当可复现性至关重要时,使用快照 ID。 对于低延迟的简单任务,优先使用 qwen3.5-flash;对于更困难的多步骤任务,使用 qwen3-max。 启用工具调用时,保持工具模式最小化和明确性。 对于多模态输入,除非任务主要以文本为中心,否则请路由到专门的 VL 或 Omni 技能。
输出位置
- 默认输出:output/aliyun-qwen-generation/requests/ 使用 OUTPUT_DIR 覆盖基础目录。
参考资料