Suggestion

A single suggested prompt presented to the user.


Overview

Suggestion represents one suggested prompt shown to the user (typically as a clickable pill). Suggestions are produced from a SuggestionsConfig and surfaced through CopilotKitCoreSubscriber.onSuggestionsChanged.

Import

import type { Suggestion } from "@copilotkit/core";

Definition

type Suggestion = {
  title: string;
  message: string;
  isLoading: boolean;
  className?: string;
};

Properties

Prop

Type

Prop

Type

Prop

Type

Prop

Type

Usage

import type { Suggestion } from "@copilotkit/core";

const suggestion: Suggestion = {
  title: "Summarize",
  message: "Summarize the current document",
  isLoading: false,
};

Related