- Cloudflare-hosted
- Function calling
- Reasoning
NVIDIA Nemotron 3 Super 是一款混合 MoE 模型,在多智能体应用和专用智能体 AI 系统中具有领先的准确率。
| 模型信息 | |
|---|---|
| 上下文窗口 ↗ | 256,000 个 token |
| 条款和许可证 | 链接 ↗ |
| 函数调用 ↗ | 是 |
| 推理 | 是 |
| 单位定价 | $0.50 per M input tokens, $1.50 per M output tokens |
试用环境
使用 Workers AI LLM Playground 试用此模型。无需设置或身份验证,即可直接在浏览器中预览和测试模型。
启动 LLM Playground用法
export interface Env {
AI: Ai;
}
export default {
async fetch(request, env): Promise<Response> {
const messages = [
{ role: "system", content: "You are a friendly assistant" },
{
role: "user",
content: "What is the origin of the phrase Hello, World",
},
];
const stream = await env.AI.run("@cf/nvidia/nemotron-3-120b-a12b", {
messages,
stream: true,
});
return new Response(stream, {
headers: { "content-type": "text/event-stream" },
});
},
} satisfies ExportedHandler<Env>;
export interface Env {
AI: Ai;
}
export default {
async fetch(request, env): Promise<Response> {
const messages = [
{ role: "system", content: "You are a friendly assistant" },
{
role: "user",
content: "What is the origin of the phrase Hello, World",
},
];
const response = await env.AI.run("@cf/nvidia/nemotron-3-120b-a12b", { messages });
return Response.json(response);
},
} satisfies ExportedHandler<Env>;
import os
import requests
ACCOUNT_ID = "your-account-id"
AUTH_TOKEN = os.environ.get("CLOUDFLARE_AUTH_TOKEN")
prompt = "Tell me all about PEP-8"
response = requests.post(
f"https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/run/@cf/nvidia/nemotron-3-120b-a12b",
headers={"Authorization": f"Bearer {AUTH_TOKEN}"},
json={
"messages": [
{"role": "system", "content": "You are a friendly assistant"},
{"role": "user", "content": prompt}
]
}
)
result = response.json()
print(result)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run/@cf/nvidia/nemotron-3-120b-a12b \
-X POST \
-H "Authorization: Bearer $CLOUDFLARE_AUTH_TOKEN" \
-d '{ "messages": [{ "role": "system", "content": "You are a friendly assistant" }, { "role": "user", "content": "Why is pizza so good" }]}'参数
输入
prompt
stringrequiredminLength: 1供模型生成响应的输入文本提示词。model
string要使用的模型 ID(例如 '@cf/zai-org/glm-4.7-flash, etc')。▶audio{}
object音频输出参数。当 modalities 包含 'audio' 时为必需。frequency_penalty
number | null根据新 token 在已有文本中的出现频率对其施加惩罚。logit_bias
object | null调整指定 token 出现在补全结果中的可能性。将 token ID 映射到 -100 到 100 之间的偏置值。logprobs
boolean | null是否返回输出 token 的对数概率。top_logprobs
integer | null在每个 token 位置返回的最高对数概率数量(0-20)。需要 logprobs=true。max_tokens
integer | null已弃用,请改用 max_completion_tokens。要生成的最大 token 数。max_completion_tokens
integer | null补全可生成的 token 数上限。metadata
object | null可附加到对象上的 16 个键值对集合。modalities
array | null请求模型输出的类型(例如 ['text'] 或 ['text', 'audio'])。n
integer | null为每条输入消息生成的聊天补全选项数量。parallel_tool_calls
booleandefault: true使用工具时是否启用并行函数调用。▶prediction{}
objectpresence_penalty
number | null根据新 token 是否已在文本中出现过对其施加惩罚。reasoning_effort
string | null限制推理模型(o1、o3-mini 等)在推理上投入的力度。▶chat_template_kwargs{}
object▶response_format
one of指定模型必须输出的格式。seed
integer | null如果指定,系统将尽力以确定性方式进行采样。service_tier
string | null指定处理请求时使用的处理类型。▶stop
one ofstore
boolean | null是否存储输出以用于模型蒸馏/评估。stream
boolean | null若为 true,部分消息增量将以服务器发送事件(server-sent events)的形式发送。▶stream_options{}
objecttemperature
number | null采样温度,取值介于 0 到 2 之间。▶tool_choice
one of控制模型调用哪个工具(如有)。'none' = 不调用工具,'auto' = 由模型决定,'required' = 必须调用工具。▶tools[]
array模型可调用的工具列表。top_p
number | null核采样:仅考虑累计概率质量达到 top_p 的 token。user
string代表您的最终用户的唯一标识符,用于滥用监控。▶web_search_options{}
object网页搜索工具的选项(使用内置网页搜索时)。▶function_call
one of▶functions[]
arrayminItems: 1maxItems: 128输出
Synchronous — Send a request and receive a complete response
id
string聊天补全的唯一标识符。object
stringcreated
integer补全创建时间的 Unix 时间戳(秒)。model
string聊天补全所使用的模型。▶choices[]
arrayminItems: 1▶usage{}
objectsystem_fingerprint
string | nullservice_tier
string | nullStreaming — Send a request with `stream: true` and receive server-sent events
type
stringcontentType
text/event-streamformat
binary