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

1.0.0 • Public • Published

AI SDK - Groq Provider

The Groq provider for the AI SDK contains language model support for the Groq chat and completion APIs and embedding model support for the Groq embeddings API.

Setup

The Groq provider is available in the @ai-sdk/groq module. You can install it with

npm i @ai-sdk/groq

Provider Instance

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

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

Example

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

const { text } = await generateText({
  model: groq('gemma2-9b-it'),
  prompt: 'Write a vegetarian lasagna recipe for 4 people.',
});

Documentation

Please check out the Groq provider documentation for more information.

Readme

Keywords

Package Sidebar

Install

npm i @ai-sdk/groq

Weekly Downloads

15,176

Version

1.0.0

License

Apache-2.0

Unpacked Size

131 kB

Total Files

10

Last publish

Collaborators

  • vercel-release-bot
  • jaredpalmer