ISummarizer Interface
Signature
export interface ISummarizer extends IEventProvider<ISummarizerEvents>, IFluidLoadable, Partial<IProvideSummarizer>
Extends: IEventProvider<ISummarizerEvents>, IFluidLoadable, Partial<IProvideSummarizer
Methods
Method | Return Type | Description |
---|---|---|
close() | void | |
enqueueSummarize(options) | EnqueueSummarizeResult | Enqueue an attempt to summarize after the specified sequence number. If afterSequenceNumber is provided, the summarize attempt is "enqueued" to run once an eligible op comes in with sequenceNumber \>= afterSequenceNumber. |
run(onBehalfOf, disableHeuristics) | Promise<SummarizerStopReason> | |
stop(reason) | void | |
summarizeOnDemand(options) | ISummarizeResults | Attempts to generate a summary on demand. If already running, takes no action. |
Method Details
close
Signature
close(): void;
enqueueSummarize
Enqueue an attempt to summarize after the specified sequence number. If afterSequenceNumber is provided, the summarize attempt is "enqueued" to run once an eligible op comes in with sequenceNumber >= afterSequenceNumber.
Signature
enqueueSummarize(options: IEnqueueSummarizeOptions): EnqueueSummarizeResult;
Parameters
Parameter | Type | Description |
---|---|---|
options | IEnqueueSummarizeOptions | options controlling the summarize attempt |
Returns
an object containing an alreadyEnqueued flag to indicate if another summarize attempt has already been enqueued. It also may contain an overridden flag when alreadyEnqueued is true, that indicates whether this attempt forced the previous attempt to abort. If this attempt becomes enqueued, it returns an object containing promises that resolve as the summarize attempt progresses. They will resolve with success false if a failure is encountered.
Return type: EnqueueSummarizeResult
run
Signature
run(onBehalfOf: string, disableHeuristics?: boolean): Promise<SummarizerStopReason>;
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
onBehalfOf | string | ||
disableHeuristics | optional | boolean |
Returns
Return type: Promise<SummarizerStopReason>
stop
Signature
stop(reason: SummarizerStopReason): void;
Parameters
Parameter | Type | Description |
---|---|---|
reason | SummarizerStopReason |
summarizeOnDemand
Attempts to generate a summary on demand. If already running, takes no action.
Signature
summarizeOnDemand(options: IOnDemandSummarizeOptions): ISummarizeResults;
Parameters
Parameter | Type | Description |
---|---|---|
options | IOnDemandSummarizeOptions | options controlling the summarize attempt |
Returns
an alreadyRunning promise if a summarize attempt is already in progress, which will resolve when the current attempt completes. At that point caller can decide to try again or not. Otherwise, it will return an object containing promises that resolve as the summarize attempt progresses. They will resolve with success false if a failure is encountered.
Return type: ISummarizeResults