Skip to main content

AiCollabErrorResponse Interface

An error response from the AI collaboration.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/ai-collab/alpha.

For more information about our API support guarantees, see here.

Signature

export interface AiCollabErrorResponse

Properties

PropertyAlertsModifiersTypeDescription
diffsAlphareadonlyreadonly Diff[]A list of diffs that represent the changes made by the AI collaboration.
errorMessageAlphareadonly"tokenLimitExceeded" | "tooManyErrors" | "tooManyModelCalls" | "aborted" | "unexpectedError"The type of known error that occured - 'tokenLimitExceeded' indicates that the LLM exceeded the token limits set by the user - 'tooManyErrors' indicates that the LLM made too many errors in a row - 'tooManyModelCalls' indicates that the LLM made too many model calls - 'aborted' indicates that the AI collaboration was aborted by the user or a limiter - 'unexpectedError' indicates that an unexpected error occured
statusAlphareadonly"failure" | "partial-failure"The status of the Ai Collaboration. - A 'partial-failure' status indicates that the AI collaboration was partially successful, but was aborted due to a limiter or other error - A "failure" status indicates that the AI collaboration was not successful at creating any changes.
tokensUsedAlphareadonlyTokenUsageTotal usage of tokens by an LLM.

Property Details

diffs

A list of diffs that represent the changes made by the AI collaboration.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature

readonly diffs: readonly Diff[];

Type: readonly Diff[]

errorMessage

The type of known error that occured - 'tokenLimitExceeded' indicates that the LLM exceeded the token limits set by the user - 'tooManyErrors' indicates that the LLM made too many errors in a row - 'tooManyModelCalls' indicates that the LLM made too many model calls - 'aborted' indicates that the AI collaboration was aborted by the user or a limiter - 'unexpectedError' indicates that an unexpected error occured

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature

readonly errorMessage: "tokenLimitExceeded" | "tooManyErrors" | "tooManyModelCalls" | "aborted" | "unexpectedError";

Type: "tokenLimitExceeded" | "tooManyErrors" | "tooManyModelCalls" | "aborted" | "unexpectedError"

status

The status of the Ai Collaboration. - A 'partial-failure' status indicates that the AI collaboration was partially successful, but was aborted due to a limiter or other error - A "failure" status indicates that the AI collaboration was not successful at creating any changes.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature

readonly status: "failure" | "partial-failure";

Type: "failure" | "partial-failure"

tokensUsed

Total usage of tokens by an LLM.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature

readonly tokensUsed: TokenUsage;

Type: TokenUsage