why the contexts are limited to one in the interface QueryRequestOptions definition:
/**
* Base query request options.
* See details at https://docs.api.ai/docs/query
*/
interface QueryRequestOptions extends RequestOptions {
timezone?: string;
resetContexts?: boolean;
sessionId: string;
contexts?: [any]; // Forced to be an array of one element
entities?: [any];
version?: string;
requestSource?: string;
originalRequest?: any;
}
As you can see the contexts are limited to be an array of one element and the API allows more than one context in the query request:
Name
Type
Description
Required
contexts
Array
Array of additional context objects. Should be sent via a POST /query request. Contexts sent in a query are activated before the query. See Contexts.
Quick question,
why the contexts are limited to one in the interface QueryRequestOptions definition:
As you can see the contexts are limited to be an array of one element and the API allows more than one context in the query request:
There is a reason for that?
Kind Regards, Leonardo Monge García.