AI Services

Shipped includes an AI Chatbot to showcase how you can integrate AI services inside your product.

You can open the AI Chatbot at http://localhost:3000/ai-chatbot

You can find the AI Chatbot UI in the file src/components/pages/AIChatbot/AIChatbot.tsx while the backend route is at src/app/api/chat/[provider]/route.ts.

This example AI Chatbot implementation shows how to use the AI Services OpenAI, Anthropic, an Google Gemini, but Shipped makes use of the Vercel AI SDK, which supports many other AI services, likes:

  • xAI Grok

  • Azure OpenAI

  • Amazon Bedrock

  • Google Vertex AI

  • Mistral

  • DeepSeek

  • Perplexity

  • Ollama

and many more. Check out the official pagearrow-up-right for the full list of AI providers.

Configuration

To use the AI Chatbot, you need to configure some environment variables:

  • OPENAI_API_KEY

  • ANTHROPIC_API_KEY

  • GOOGLE_GENERATIVE_AI_API_KEY

You can generate the API Keys by creating an account on the relative AI services websites.

circle-exclamation

The Vercel AI SDK is a powerful library, and the documentationarrow-up-right describes a lot of uses cases and functionalities. I recommend to read it if you want to learn more about what's possible.

Last updated