Semantic Kernel JavaScript
    Preparing search index...

    Class ChatResponseUpdate

    Represents a single streaming response chunk from a ChatClient.

    Index

    Constructors

    Properties

    additionalProperties?: AdditionalProperties<unknown>
    authorName?: string

    The name of the author of the update.

    choiceIndex: number

    Gets or sets the zero-based index of the choice with which this update is associated in the streaming sequence.

    completionId?: string

    Gets or sets the ID of the completion of which this update is a part.

    contents: AIContent[]

    The completion update content items.

    createdAt?: number

    Gets or sets a timestamp for the completion update.

    finishReason?: ChatFinishReason

    Gets or sets the finish reason for the operation.

    modelId?: string

    Gets or sets the model ID using in the creation of the chat completion of which this update is a part.

    rawRepresentation: unknown
    role?: ChatRole

    Gets or sets the role of the author of the completion update.

    Accessors

    • get text(): string

      Returns string

    Methods

    • Returns string

    • Creates a new instance of ChatResponseUpdate from a JSON string.

      Parameters

      • data: string

        The JSON string representing the ChatResponseUpdate.

      Returns ChatResponseUpdate

      A new instance of ChatResponseUpdate populated with the data from the JSON string.