Description
An AI chat app built on Vercel that integrates Kasada's advanced bot protection. Prevent abusive API calls to the LLM before they occur.
npx boilerapp advanced-ai-bot-protectionDocumentación
Next.js x AI SDK x Kasada
Integration of an AI chat app based on Vercel's AI SDK and Kasada's advanced bot protection solution.
This implementation hooks into the API calls to the LLM and prevents abusive usage before it occurs.
Setup
- Run these commands to install the dependencies and create a
.env.localfile:
pnpm i
cp .env.local.example .env.local # and fill in the required values
- Based on your Kasada dashboard, update the API URL in both
kasada-server.tsandkasada-client.ts. It looks something like this:
https://${kasadaAPIHostname}/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/api/${kasadaAPIVersion}/classification
- Move the existing
app/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/[[...restpath]]/route.tsfile to your new path, and fill in theKASADA_ENDPOINTandX-Forwarded-Hostheader inside of it. They're labelledFILL_IN. \
Prix
Gratuit