AzureChatExtensionsMessageContext Class

  • java.lang.Object
    • com.azure.ai.openai.models.AzureChatExtensionsMessageContext

Implements

public final class AzureChatExtensionsMessageContext
implements JsonSerializable<AzureChatExtensionsMessageContext>

A representation of the additional context information available when Azure OpenAI chat extensions are involved in the generation of a corresponding chat completions response. This context information is only populated when using an Azure OpenAI request configured to use a matching extension.

Method Summary

Modifier and Type Method and Description
static AzureChatExtensionsMessageContext fromJson(JsonReader jsonReader)

Reads an instance of AzureChatExtensionsMessageContext from the JsonReader.

List<AzureChatExtensionRetrievedDocument> getAllRetrievedDocuments()

Get the allRetrievedDocuments property: All the retrieved documents.

List<AzureChatExtensionDataSourceResponseCitation> getCitations()

Get the citations property: The contextual information associated with the Azure chat extensions used for a chat completions request.

String getIntent()

Get the intent property: The detected intent from the chat history, used to pass to the next turn to carry over the context.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static AzureChatExtensionsMessageContext fromJson(JsonReader jsonReader)

Reads an instance of AzureChatExtensionsMessageContext from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of AzureChatExtensionsMessageContext if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the AzureChatExtensionsMessageContext.

getAllRetrievedDocuments

public List getAllRetrievedDocuments()

Get the allRetrievedDocuments property: All the retrieved documents.

Returns:

the allRetrievedDocuments value.

getCitations

public List getCitations()

Get the citations property: The contextual information associated with the Azure chat extensions used for a chat completions request. These messages describe the data source retrievals, plugin invocations, and other intermediate steps taken in the course of generating a chat completions response that was augmented by capabilities from Azure OpenAI chat extensions.

Returns:

the citations value.

getIntent

public String getIntent()

Get the intent property: The detected intent from the chat history, used to pass to the next turn to carry over the context.

Returns:

the intent value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to