This repository contains examples demonstrating how to interact with the Groq API using Node.js. Each example is based on a tutorial from a YouTube video that guides you through the process of setting up and making the most of Groq's inference API, the OpenAI SDK, Langchain, Llama Index, and Vercel AI SDK.
For a step-by-step guide, watch the tutorial on YouTube that walks you through each example: YouTube Video Link
Before you begin, make sure you have the following installed:
- Node.js / Bun
You'll also need API keys from:
- Groq Platform
- OpenAI (For RAG Llamaindex example)
To get started with the examples, clone this repository to your local machine:
git clone [[repository-url]](https://github.com/developersdigest/Groq-API-Quick-Guide-with-Examples-Groq-SDK-Langchain-LlamaIndex-OpenAI-SDK-Vercel)
cd [Groq-API-Quick-Guide-with-Examples-Groq-SDK-Langchain-LlamaIndex-OpenAI-SDK-Vercel]
Install the required dependencies for each example:
cd 1-groq-sdk
bun install
The repository is structured with separate directories for each example, as outlined below:
Located in 1-groq-sdk
. This example covers the basics of setting up and using the Groq SDK.
Located in 2-openai-sdk
. This example demonstrates how to utilize the OpenAI SDK in conjunction with Groq.
Located in 3-langchain
. Here, we show how to integrate Langchain with the Groq API.
Located in 4-llamaindex
. Explore how to use Llamaindex to enhance your applications with Groq.
Located in 5-vercel-ai-sdk
. Learn to set up and use the Vercel AI SDK with Groq.
For more detailed information about the Groq API and related SDKs, refer to the following resources: