Frontend Accelerator
Frontend Accelerator
  • Getting Started
    • Welcome
    • Start right now 👉
  • Setup
    • Database
    • Payments
    • Authentication
    • AI
  • Features
    • Dashboard
    • Localization
    • Changelog
    • Rich text editor
    • Lead magnet
    • Checkout button
    • Sign in button
    • Sales countdown banner
    • Capture email button
    • Locale switcher
    • Social icons
  • Extra
    • Theming
    • Support
Powered by GitBook
On this page
  1. Setup

AI

Supported AI:

  • OpenAI

  • Gemini

  • Claude

The AI Adapter provides a flexible interface for integrating AI models into the application, supporting OpenAI, Gemini and Claude.

How It Works:

  1. Set up API key: Ensure AI_API_KEY is configured in the .env variables.

  2. Choose AI provider: Define whether OpenAI or Claude is used in the app config.

  3. Call AI functions:

    • generateResponse - standard function to get the entire AI response at once.

    • streamResponse - streaming function to receive incremental responses dynamically.

    • generateImage - generate 1024x1024 image and provides an URL

    • estimateTokens - returns estimate tokens count

    • summarizeText - summarizes given text

    • moderateContent - returns boolean whether the content is flagged as inappropriate

This adapter simplifies AI integration, making it easy to incorporate intelligent responses and conversational AI into your application.

PreviousAuthenticationNextDashboard

Last updated 1 month ago