UNPKG

@copilotkit/react-core

Version:

<img src="https://github.com/user-attachments/assets/0a6b64d9-e193-4940-a3f6-60334ac34084" alt="banner" style="border-radius: 12px; border: 2px solid #d6d4fa;" />

36 lines (33 loc) 1.34 kB
import { StaticSuggestionsConfig, Suggestion } from '@copilotkitnext/core'; type StaticSuggestionInput = Omit<Suggestion, "isLoading"> & Partial<Pick<Suggestion, "isLoading">>; type StaticSuggestionsConfigInput = Omit<StaticSuggestionsConfig, "suggestions"> & { suggestions: StaticSuggestionInput[]; }; type DynamicSuggestionsConfigInput = { /** * A prompt or instructions for the GPT to generate suggestions. */ instructions: string; /** * The minimum number of suggestions to generate. Defaults to `1`. * @default 1 */ minSuggestions?: number; /** * The maximum number of suggestions to generate. Defaults to `3`. * @default 1 */ maxSuggestions?: number; /** * Whether the suggestions are available. Defaults to `enabled`. * @default enabled */ available?: "enabled" | "disabled" | "always" | "before-first-message" | "after-first-message"; /** * An optional class name to apply to the suggestions. */ className?: string; }; type UseCopilotChatSuggestionsConfiguration = DynamicSuggestionsConfigInput | StaticSuggestionsConfigInput; declare function useCopilotChatSuggestions(config: UseCopilotChatSuggestionsConfiguration, dependencies?: any[]): void; export { UseCopilotChatSuggestionsConfiguration, useCopilotChatSuggestions };