@ai-sdk/google v0.0.55
AI SDK - Google Generative AI Provider
The Google Generative AI provider for the 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('gemini-1.5-pro-latest'),
prompt: 'Write a vegetarian lasagna recipe for 4 people.',
});
Documentation
Please check out the Google Generative AI provider documentation for more information.
4 months ago
4 months ago
4 months ago
5 months ago
5 months ago
5 months ago
6 months ago
5 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
8 months ago
8 months ago
7 months ago
7 months ago
9 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
11 months ago