Moonshot AI 的 Kimi K2.7 Code 现已上线 AI Gateway。
K2.7 Code 是一款专为长时程编程任务打造的代码模型,可泛化应用于前端开发、DevOps 和性能优化等场景。该模型采用原生多模态架构,支持文本和视觉输入,且始终运行于思考模式。
使用 K2.7 Code 时,请在 AI SDK 中将 model 设置为 moonshotai/kimi-k2.7-code:
import { streamText } from 'ai';
const result = streamText({
model: 'moonshotai/kimi-k2.7-code',
prompt: 'Refactor this service to remove the N+1 queries.',
});
通过传递图像和提示词,即可使用该模型的多模态输入:
import { streamText } from 'ai';
const result = streamText({
model: 'moonshotai/kimi-k2.7-code',
messages: [
{
role: 'user',
content: [
{ type: 'text', text: 'Describe the image in detail.' },
{
type: 'image',
image:
'https://exampleimage.com',
},
],
},
],
});
AI Gateway 提供统一的 API,用于调用模型、跟踪使用量和成本,并配置重试、故障转移和性能优化以实现高于提供商的正常运行时间。它内置 自定义报告、Zero Data Retention 支持、API 密钥预算 等功能。AI Gateway 完全反映提供商定价,无加价,且不收取平台推理费用,包括 Bring Your Own Key (BYOK) 请求。
了解更多 AI Gateway 信息,查看 AI Gateway 模型排行榜,或在我们的 模型游乐场 中体验。
0 Comments
Log in to join the conversation.No comments yet. Be the first to share your thoughts.