Package com.azure.ai.inference.models
Class ChatCompletionsFunctionToolCall
java.lang.Object
com.azure.ai.inference.models.ChatCompletionsToolCall
com.azure.ai.inference.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.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class com.azure.ai.inference.models.ChatCompletionsToolCall
getId
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ChatCompletionsFunctionToolCall
Creates an instance of ChatCompletionsFunctionToolCall class.- Parameters:
id
- the id value to set.function
- the function value to set.
-
-
Method Details
-
getType
Get the type property: The object type.- Overrides:
getType
in classChatCompletionsToolCall
- Returns:
- the type value.
-
getFunction
Get the function property: The details of the function invocation requested by the tool call.- Overrides:
getFunction
in classChatCompletionsToolCall
- Returns:
- the function value.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<ChatCompletionsToolCall>
- Overrides:
toJson
in 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.
-