google.ts 510 B

123456789101112131415161718
  1. import type { RouteModelInput } from "../route/client"
  2. import { Provider } from "../provider"
  3. import { ProviderID, type ModelID } from "../schema"
  4. import * as Gemini from "../protocols/gemini"
  5. export const id = ProviderID.make("google")
  6. export const routes = [Gemini.route]
  7. export const model = (
  8. id: string | ModelID,
  9. options: Omit<RouteModelInput, "id" | "baseURL"> & { readonly baseURL?: string } = {},
  10. ) => Gemini.model({ ...options, id })
  11. export const provider = Provider.make({
  12. id,
  13. model,
  14. })