An open-source chat integration leveraging NVIDIA AI and Vercel AI SDK. Features real-time message processing with robust model support. Contributions are welcome to enhance functionality and improve user experience.
GPL-3.0 License
This template utilizes the NVIDIA AI API to retrieve models and perform inferences. The Vercel AI SDK enables streaming of responses from the server to the client in real-time, ensuring a smooth user experience.
NVIDIA NIM offers 1000 free credits to new users. A custom rate limiter, set to 10 requests per hour per IP address, ensures fair usage. Modify these settings in ratelimit.ts
.
This template includes several text-to-text models. Additional models can be integrated as per the NVIDIA NIM documentation.
gemma-2b
gemma-2-9b-it
gemma-2-27b-it
llama3-8b-instruct
llama3-70b-instruct
llama3-chatqa-1.5-8b
llama3-chatqa-1.5-70b
nemotron-4-340b-instruct
granite-8b-code-instruct
granite-34b-code-instruct
Note:
Mistral AI
and other models are currently incompatible with the Vercel AI SDK.
Deploy your version of this template on Vercel with a single click.
Environment Setup: Create a .env.local
file in the root directory based on .env.example
. This file should not be committed.
NVIDIA_API_KEY=
API Key: Obtain an NVIDIA NIM API key by signing up on the NVIDIA AI website.
Clone and Install Dependencies:
git clone https://github.com/arnab-4/nvidia-vercel.git
cd nvidia-vercel
npm install
Run the Development Server:
npm run dev
The app will be available at http://localhost:3000.
We welcome contributions! Feel free to open an issue or submit a pull request with your ideas and suggestions.
This template is open-source and free to use. Feel free to adapt it to your needs.