Skip to main content

Function: toCite()

function toCite(received, ids, sources?): object;

Passes when the answer cites each of the given sources: at least one of its sentences is supported by that source.

Parameters​

ParameterTypeDescription
received| string | { answer: string; results?: any[]; }An answer, or a run() result
idsstring | string[]Source id(s) that must be cited
sources?any[]Defaults to the run() result's results

Returns​

object

message​

message: () => string;

Returns​

string

pass​

pass: boolean;