assistant

Description:
  • Interface to assistant SSE.
Source:
Interface to assistant SSE.

Methods

(inner) getAssistantResultsStream(intent, parametersopt) → {ReadableStream}

Description:
  • Retrieve a stream of assistant results from Constructor.io API
Source:
Example
const readableStream = constructorio.assistant.getAssistantResultsStream('I want to get shoes', {
    domain: "nike_sportswear",
});
const reader = readableStream.getReader();
const { value, done } = await reader.read();
Parameters:
Name Type Attributes Description
intent string Intent to use to perform an intent based recommendations
parameters object <optional>
Additional parameters to refine result set
Properties
Name Type Attributes Description
domain string <optional>
domain name e.g. swimming sports gear, groceries
numResultsPerPage number <optional>
The total number of results to return
Returns:
Returns a ReadableStream.
Type
ReadableStream