diff options
| author | polwex <polwex@sortug.com> | 2025-07-23 07:42:10 +0700 |
|---|---|---|
| committer | polwex <polwex@sortug.com> | 2025-07-23 07:42:10 +0700 |
| commit | a23f430e2afd7d9ea462f71c2fd1568d8e1dba38 (patch) | |
| tree | 67b4b53c8009e4c342fa36ec35520023bafd6368 /tests | |
| parent | de917196d3602197a90e9eaa7cf7f8b5d0c7718e (diff) | |
turns out kimi an others dont implement the new openai sdk
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test.ts | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/test.ts b/tests/test.ts index 0b311f6..f962364 100644 --- a/tests/test.ts +++ b/tests/test.ts @@ -1,21 +1,21 @@ -import Router from "."; -import OpenAI from "openai"; +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 = Router({ kimi: "" }); + // 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.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"); + const res = await api.send("henlo"); console.log({ res }); } run(); |
