Recommended Actions API Reference
Concise reference for the public exports from react-actions-chat-recommended-actions.
Main Flow Creators
createQueryRecommendedActionsFlow(config)
Creates a reusable flow that asks for a query, resolves recommended buttons, and renders them in the chat.
Returned API:
button: MessageButtonstart(): voidrecommend(query: string): Promise<void>
Important config fields:
initialLabelqueryPromptMessagegetRecommendedActions(query, context)normalizeQuerybuildRecommendationsMessageemptyStateMessageerrorMessageloadingMessageminimumLoadingDurationMsvalidatorplaceholderinputDescription
createVectorSearchQueryRecommendedActionsFlow(config)
Creates a semantic recommendation flow over button definitions.
Supported config shapes:
buttons+embedderbuttons+getButtonEmbeddingsearchadapter
Important config fields:
buttonssearchembedderembedQuerycreateActionbuildResultminScoremaxResults
Core Types
VectorSearchButtonDefinition
Searchable button definition used by the vector-search flow.
It extends a reusable action definition with metadata such as description and exampleQueries so semantically similar user prompts can map to the same button.
QueryRecommendedActionsContext
Resolver context with:
querymessages
QueryRecommendedActionsFlow
Public object returned by createQueryRecommendedActionsFlow(...).
VectorSearchButtonMatch
Scored result shape:
buttonscore
Embedder Helpers
createOpenAITextEmbedder(config)
Builds a TextEmbedder backed by OpenAI embeddings.
createCohereTextEmbedder(config)
Builds a TextEmbedder backed by Cohere embeddings.
createVoyageTextEmbedder(config)
Builds a TextEmbedder backed by Voyage embeddings.
Related Exported Types
TextEmbedderEmbeddingVectorEmbeddingInputTypeEmbedTextOptionsFetchLike- provider config types for OpenAI, Cohere, and Voyage
Helper Utilities
buildVectorSearchButtonText(button)
Builds the search text used to represent a button definition.
embedTexts(...)
Shared utility used by the vector-search flow and the exported embedder layer.