TOZPIEĐang tải...
Kimi multimodal agent model for visual understanding, coding, and planning
Khuyên dùng cho: Phù hợp cho các tác vụ Chat, Completions, Vision, Video, Multimodal, Reasoning, Function Calling, JSON Mode, Open Weights, File Attachments và triển khai production chịu tải cao.
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "aig_live_YOUR_API_KEY",
baseURL: "https://api.tozpie.net/v1"
});
async function main() {
const completion = await client.chat.completions.create({
model: "Kimi-k2.6",
messages: [{ role: "user", content: "Hãy giới thiệu năng lực của bạn." }],
stream: true,
});
for await (const chunk of completion) {
process.stdout.write(chunk.choices[0]?.delta?.content || "");
}
}
main();| Tham số | Kiểu dữ liệu | Mặc định | Mô tả |
|---|---|---|---|
| model | string | bắt buộc | Định danh mô hình mục tiêu (ví dụ: claude-3-7-sonnet, gpt-5, deepseek-r1, gemini-2.5-pro). (e.g. "Kimi-k2.6"). |
| messages | array | bắt buộc | Mảng các đối tượng tin nhắn chứa role (system, user, assistant) và content. |
| stream | boolean | false | Kích hoạt truyền luồng dữ liệu từng đoạn qua Server-Sent Events (SSE). |
| temperature | number | 1.0 | Độ biến thiên ngẫu nhiên của phản hồi (từ 0.0 đến 2.0). |
| max_tokens | integer | null | Số lượng tokens tối đa tạo ra trong kết quả phản hồi. |