@ai-sdk/google
TypeScript icon, indicating that this package has built-in type declarations

0.0.20 • Public • Published

Vercel AI SDK - Google Generative AI Provider

The Google Generative AI provider for the Vercel AI SDK contains language model support for the Google Generative AI APIs.

Setup

The Google Generative AI provider is available in the @ai-sdk/google module. You can install it with

npm i @ai-sdk/google

Provider Instance

You can import the default provider instance google from @ai-sdk/google:

import { google } from '@ai-sdk/google';

Example

import { google } from '@ai-sdk/google';
import { generateText } from 'ai';

const { text } = await generateText({
  model: google('models/gemini-pro'),
  prompt: 'Write a vegetarian lasagna recipe for 4 people.',
});

Documentation

Please check out the Google Generative AI provider documentation for more information.

Readme

Keywords

Package Sidebar

Install

npm i @ai-sdk/google

Weekly Downloads

5,431

Version

0.0.20

License

Apache-2.0

Unpacked Size

127 kB

Total Files

10

Last publish

Collaborators

  • vercel-release-bot
  • jaredpalmer