summaryrefslogtreecommitdiff
path: root/index.ts
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2025-10-19 10:30:47 +0700
committerpolwex <polwex@sortug.com>2025-10-19 10:30:47 +0700
commitba16ebcbe36c1a1cbdb1d1379cb3f9c3a086acdf (patch)
tree7ba1f8bb59d0f25d1c6539865f82d8a4e0dbe4f8 /index.ts
parenta23f430e2afd7d9ea462f71c2fd1568d8e1dba38 (diff)
checkpoint
Diffstat (limited to 'index.ts')
-rw-r--r--index.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/index.ts b/index.ts
index 9776285..9dcae26 100644
--- a/index.ts
+++ b/index.ts
@@ -16,31 +16,32 @@ export default function (choice: LLMChoice): AIModelAPI {
: "chatgpt" in choice
? new Generic({
baseURL: "https://api.openai.com/v1",
- apiKey: Bun.env.OPENAI_API_KEY,
+ apiKey: Bun.env.OPENAI_API_KEY!,
model: choice.chatgpt || "o4-mini",
})
: "deepseek" in choice
? new Generic({
baseURL: "https://api.deepseek.com",
- apiKey: Bun.env.DEEPSEEK_API_KEY,
+ apiKey: Bun.env.DEEPSEEK_API_KEY!,
model: "deepseek-reasoner",
})
: "kimi" in choice
? new Generic({
baseURL: "https://api.moonshot.ai/v1",
- apiKey: Bun.env.MOONSHOT_API_KEY,
+ apiKey: Bun.env.MOONSHOT_API_KEY!,
model: "kimi-k2-0711-preview", // "kimi-latest"?
})
: "grok" in choice
? new Generic({
baseURL: "https://api.x.ai/v1",
- apiKey: Bun.env.XAI_API_KEY,
+ apiKey: Bun.env.XAI_API_KEY!,
model: "grok-4", // "kimi-latest"?
})
: new Generic({
baseURL: choice.openai.url,
apiKey: choice.openai.apiKey,
model: choice.openai.model,
+ allowBrowser: choice.openai.allowBrowser,
});
// "" in choice
// ? new Generic(choice.other)