Actions2
Generative Search
AI-generatedSummary
Perform a generative AI-powered search using Yandex Cloud's GenSearch API, sending a conversation-like sequence of messages and receiving AI-generated answer responses with supporting sources and query corrections.
Inputs
- Folder ID — Folder ID to use for the search; if not provided, the folder ID from credentials is used. Required if missing in credentials.
- Messages (required) — A collection of conversation messages with roles (User or Assistant) and content, representing the input dialogue for generative search.
- Additional Options — Optional parameters to control search behavior, including enabling documents not on front page, fixing misspellings, enabling partial streaming results, and restricting search by host, site, or URL, as well as selecting regional search type.
Output shape
a single JSON object containing two fields: 'responses', an array of generative search responses streaming from the API including messages, sources, and metadata; and 'finalResponse', the last response in the sequence.
The operation streams multiple partial responses asynchronously, collecting them into the 'responses' array. Each response includes the AI-generated message, associated source documents if any, search queries used, misspelling fixes, and flags indicating answer type and rejection status. Errors propagate as node execution errors unless configured to continue on failure.
Examples
Example 1: Use generative search to get an AI answer to a user query with chat history context and optional site restriction.
Set Folder ID (or ensure it’s in credentials), provide Messages with User and Assistant roles, and optionally add Additional Options like site restriction or search type. The node returns a JSON with sequential generative responses and the final answer.