Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@ai-sdk/groq

Package Overview
Dependencies
Maintainers
2
Versions
227
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ai-sdk/groq

The **[Groq provider](https://sdk.vercel.ai/providers/ai-sdk-providers/groq)** for the [AI SDK](https://sdk.vercel.ai/docs) contains language model support for the Groq chat and completion APIs and embedding model support for the Groq embeddings API.

Source
npmnpm
Version
1.1.12
Version published
Weekly downloads
941K
11.14%
Maintainers
2
Weekly downloads
 
Created
Source

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.

Keywords

ai

FAQs

Package last updated on 05 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts