mirror of
https://github.com/luckyyzh/pi-agent-integrated.git
synced 2026-10-03 19:19:34 +00:00
feat: integrate Pi backend and Pi Web
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { openAICompletionsApi } from "../api/openai-completions.lazy.ts";
|
||||
import { envApiKeyAuth } from "../auth/helpers.ts";
|
||||
import { createProvider, type Provider } from "../models.ts";
|
||||
import { MOONSHOTAI_CN_MODELS } from "./moonshotai-cn.models.ts";
|
||||
|
||||
export function moonshotaiCnProvider(): Provider<"openai-completions"> {
|
||||
return createProvider({
|
||||
id: "moonshotai-cn",
|
||||
name: "Moonshot AI CN",
|
||||
baseUrl: "https://api.moonshot.cn/v1",
|
||||
auth: { apiKey: envApiKeyAuth("Moonshot AI API key", ["MOONSHOT_API_KEY"]) },
|
||||
models: Object.values(MOONSHOTAI_CN_MODELS),
|
||||
api: openAICompletionsApi(),
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user