UNPKG

workers-ai-provider

Version:

Workers AI Provider for the vercel AI SDK

21 lines (20 loc) 635 B
import { createGoogleGenerativeAI } from "@ai-sdk/google"; //#region src/google.ts /** * Google (Gemini) provider plugin for the gateway delegate. Pass to * `createGatewayDelegate({ providers: [google] })` to handle `"google/<model>"` * (Google AI Studio) and `"google-vertex/<model>"` slugs. * * Requires `@ai-sdk/google` (an optional peer dependency — install it yourself). */ const google = { wireFormat: "google", create: ({ modelId, fetch, baseURL }) => createGoogleGenerativeAI({ apiKey: "unused", fetch, ...baseURL ? { baseURL } : {} })(modelId) }; //#endregion export { google }; //# sourceMappingURL=google.mjs.map