ai-chatbot/lib/ai/provider-defaults.ts
Your Name d272bd5ee8
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled
feat(canvas): add Tripo3D generation workspace and provider config
2026-02-28 21:57:51 +08:00

22 lines
968 B
TypeScript

import type { AiProvider } from "@/lib/db/schema";
const PROVIDER_DEFAULT_BASE_URL: Partial<Record<AiProvider["type"], string>> = {
alibaba: "https://dashscope.aliyuncs.com/compatible-mode/v1",
openai: "https://api.openai.com/v1",
"huanke-gemini": "https://api.huandutech.com/v1",
"qianwen-video": "https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation",
"doubao-video": "https://ark.cn-beijing.volces.com/api/v3",
"volcano-vision": "https://ark.cn-beijing.volces.com",
"volcano-video": "https://ark.cn-beijing.volces.com/api/v3",
"alibaba-image":
"https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation",
"ruxa-image": "https://api.ruxa.ai",
"fal-image": "https://fal.run",
"fal-video": "https://fal.run",
"tripo-3d": "https://api.tripo3d.ai/v2/openapi",
};
export function getProviderDefaultBaseUrl(type: AiProvider["type"]): string | undefined {
return PROVIDER_DEFAULT_BASE_URL[type];
}