Package com.azure.ai.openai.models
Class ChatCompletionsFunctionToolCall
java.lang.Object
com.azure.ai.openai.models.ChatCompletionsToolCall
com.azure.ai.openai.models.ChatCompletionsFunctionToolCall
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ChatCompletionsToolCall>
A tool call to a function tool, issued by the model in evaluation of a configured function tool, that represents
a function invocation needed for a subsequent chat completions request to resolve.
-
Constructor Summary
ConstructorsConstructorDescriptionChatCompletionsFunctionToolCall(String id, FunctionCall function) Creates an instance of ChatCompletionsFunctionToolCall class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ChatCompletionsFunctionToolCall from the JsonReader.Get the function property: The details of the function invocation requested by the tool call.getType()Get the type property: The object type.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class com.azure.ai.openai.models.ChatCompletionsToolCall
getId
-
Constructor Details
-
ChatCompletionsFunctionToolCall
Creates an instance of ChatCompletionsFunctionToolCall class.- Parameters:
id- the id value to set.function- the function value to set.
-
-
Method Details
-
getFunction
Get the function property: The details of the function invocation requested by the tool call.- Returns:
- the function value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ChatCompletionsToolCall>- Overrides:
toJsonin classChatCompletionsToolCall- Throws:
IOException
-
fromJson
public static ChatCompletionsFunctionToolCall fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ChatCompletionsFunctionToolCall from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ChatCompletionsFunctionToolCall if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the ChatCompletionsFunctionToolCall.
-
getType
Get the type property: The object type.- Overrides:
getTypein classChatCompletionsToolCall- Returns:
- the type value.
-