ChatCompletionsToolCall Class

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

Implements

public class ChatCompletionsToolCall
implements JsonSerializable<ChatCompletionsToolCall>

An abstract representation of a tool call that must be resolved in a subsequent request to perform the requested chat completion.

Constructor Summary

Constructor Description
ChatCompletionsToolCall(String id)

Creates an instance of ChatCompletionsToolCall class.

Method Summary

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

Reads an instance of ChatCompletionsToolCall from the JsonReader.

String getId()

Get the id property: The ID of the tool call.

String getType()

Get the type property: The object type.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

ChatCompletionsToolCall

public ChatCompletionsToolCall(String id)

Creates an instance of ChatCompletionsToolCall class.

Parameters:

id - the id value to set.

Method Details

fromJson

public static ChatCompletionsToolCall fromJson(JsonReader jsonReader)

Reads an instance of ChatCompletionsToolCall from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getId

public String getId()

Get the id property: The ID of the tool call.

Returns:

the id value.

getType

public String getType()

Get the type property: The object type.

Returns:

the type value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to