blob: 0b311f662344c3b5d609ab242d958e993ff6f7d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import Router from ".";
import OpenAI from "openai";
async function run() {
// const api = Router({ claude: "" });
const api = new OpenAI({
baseURL: "https://api.moonshot.ai/v1",
apiKey: Bun.env.MOONSHOT_API_KEY,
});
const model = "kimi-k2-0711-preview";
// const api = new OpenAI();
// const model = "o4-mini";
const res = await api.responses.create({ model, input: "Hello!" });
// const res = await api.chat.completions.create({
// model,
// messages: [{ role: "user", content: "Hello there" }],
// });
// const res = await api.send("henlo");
console.log({ res });
}
run();
// gemini works
// claude works too.
// it's the openai API thingy
|