Qwen-QwQ-Plus
复制成功!
立即体验加入对比
推理
概述
推理
千问QwQ推理模型增强版,基于Qwen2.5模型训练的QwQ推理模型,通过强化学习大幅度提升了模型推理能力。模型数学代码等核心指标(AIME 24/25、livecodebench)以及部分通用指标(IFEval、LiveBench等)达到DeepSeek-R1 满血版水平。
输入
文本
输出
文本
功能
前缀补全
函数调用
缓存
结构化输出
批量任务
联网搜索
微调
定价
- 输入¥1.6/M tokens
- 输出¥4/M tokens
- 输入(Batch File)¥0.8/M tokens
- 输出(Batch File)¥2/M tokens
上下文
上下文
131.07K
最大输入
98.30K
最大输出
8.19K
速率限制
- RPM每分钟请求数600
- TPM每分钟 Token 数1M
API 参考
获取 API Key复制成功!
12345678910111213141516171819202122232425262728293031323334353637
import os
from dashscope import Generation
import dashscope
dashscope.base_http_api_url = "https://dashscope.aliyuncs.com/api/v1/"
messages = [{"role": "user", "content": "你是谁?"}]
completion = Generation.call(
api_key=os.getenv("DASHSCOPE_API_KEY"),
model="qwq-plus",
messages=messages,
result_format="message",
stream=True,
incremental_output=True,
)
is_answering = False
print("=" * 20 + "思考过程" + "=" * 20)
for chunk in completion:
if (
chunk.output.choices[0].message.content == ""
and chunk.output.choices[0].message.reasoning_content == ""
):
pass
else:
if (
chunk.output.choices[0].message.reasoning_content != ""
and chunk.output.choices[0].message.content == ""
):
print(chunk.output.choices[0].message.reasoning_content, end="", flush=True)
elif chunk.output.choices[0].message.content != "":
if not is_answering:
print("\n" + "=" * 20 + "完整回复" + "=" * 20)
is_answering = True
print(chunk.output.choices[0].message.content, end="", flush=True)