RAG ChatBot setup with Next.js and Vercel AI SDK using the GROQ
- run
npm install
- run
npm run dev
- Create a
.env
file and copy the conent from.env.example
to this file GROQ_API_KEY
- Get your groq API key from Groq ConsoleUPSTASH_REDIS_REST_URL
- Get your redis url from Upstash ConsoleUPSTASH_REDIS_REST_TOKEN
- Get your redis token from Upstash ConsoleUPSTASH_VECTOR_REST_URL
- Get your vector url from Upstash ConsoleUPSTASH_VECTOR_REST_TOKEN
- Get your vector token from Upstash ConsoleGOOGLE_DRIVE_FOLDER_ID
- Get your google drive folder id from Google Drive Console
Note:
- Enable the Google Drive API that allows clients to access resources from Google Drive.
- Make sure to Share the folder access with the service account email.
- When creating you vector store - chose the 768 dimension with COSINE metric.
768/COSINE
- When generating the embeddings - make sure the ollama is running locally and the model
nomic-embed-text
is installed, use the commandollama pull nomic-embed-text
to pull the model. Nomic Embed Text