FeaturesCMSComponents
PreviousNext

AskAI

Enable users to ask AI questions about your content with integrated LLM endpoints.

Overview

The AskAI component provides a seamless way for users to interact with AI assistants about your content. It creates contextual prompts and opens conversations in popular AI platforms like ChatGPT, Grok, and others, using your LLM endpoints for accurate, content-aware responses.

How It Works

The AskAI component generates intelligent prompts that include:

  • Context about your company/product
  • Direct links to your documentation
  • Instructions for the AI to provide helpful assistance

When clicked, it opens a dropdown menu with options to continue the conversation in various AI platforms.

Install the required dependencies:

The AskAI component uses Radix UI components for the dropdown interface.

pnpm add @radix-ui/react-dropdown-menu @radix-ui/react-popover

Make sure that the following shadcn/ui components are present in your project:

Copy and paste the following code into your project.

components/ui/ask-ai.tsx
'use client';

import { Button } from '@kit/ui/button';
import {
    DropdownMenu,
    DropdownMenuContent,
    DropdownMenuItem,
    DropdownMenuTrigger,
} from '@kit/ui/dropdown-menu';
import { Icon } from '@kit/ui/icon';
Get the Kit
Kit required to see the full code

Update the import paths to match your project setup.

Integrated LLM endpoints

EndpointDescription
View as MarkdownDirect link to your LLM endpoint
ChatGPTOpenAI's conversational AI
GrokxAI's helpful and maximally truthful AI
ClaudeAnthropic's constitutional AI (do not support pre-filling prompts)
v0Vercel's AI-powered design tool
Scira AIAdvanced AI assistant
t3t3.chat's AI assistant (do not support pre-filling prompts)

Usage

import { AskAi } from '@kit/cms/ui/ask-ai';
<AskAi
    url={'/path/to/your/md/endpoint'}
    companyName="Your Blog"
/>

API Reference

AskAiProps

PropTypeDefault
url*
string
companyName*
string

How is this guide?

Last updated on 10/17/2025