Package com.azure.ai.inference.models
Class ChatRequestAssistantMessage
java.lang.Object
com.azure.ai.inference.models.ChatRequestMessage
com.azure.ai.inference.models.ChatRequestAssistantMessage
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ChatRequestMessage>
A request chat message representing response or action from the assistant.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ChatRequestAssistantMessage class.ChatRequestAssistantMessage(String content) Creates an instance of ChatRequestAssistantMessage class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ChatRequestAssistantMessagefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ChatRequestAssistantMessage from the JsonReader.Get the content property: The content of the message.getRole()Get the role property: The chat role associated with this message.Get the toolCalls property: The tool calls that must be resolved and have their outputs appended to subsequent input messages for the chat completions request to resolve as configured.setContent(String content) Set the content property: The content of the message.setToolCalls(List<ChatCompletionsToolCall> toolCalls) Set the toolCalls property: The tool calls that must be resolved and have their outputs appended to subsequent input messages for the chat completions request to resolve as configured.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ChatRequestAssistantMessage
public ChatRequestAssistantMessage()Creates an instance of ChatRequestAssistantMessage class. -
ChatRequestAssistantMessage
Creates an instance of ChatRequestAssistantMessage class.- Parameters:
content- the content value to set.
-
-
Method Details
-
getRole
Get the role property: The chat role associated with this message.- Overrides:
getRolein classChatRequestMessage- Returns:
- the role value.
-
getContent
Get the content property: The content of the message.- Returns:
- the content value.
-
setContent
Set the content property: The content of the message.- Parameters:
content- the content value to set.- Returns:
- the ChatRequestAssistantMessage object itself.
-
getToolCalls
Get the toolCalls property: The tool calls that must be resolved and have their outputs appended to subsequent input messages for the chat completions request to resolve as configured.- Returns:
- the toolCalls value.
-
setToolCalls
Set the toolCalls property: The tool calls that must be resolved and have their outputs appended to subsequent input messages for the chat completions request to resolve as configured.- Parameters:
toolCalls- the toolCalls value to set.- Returns:
- the ChatRequestAssistantMessage object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ChatRequestMessage>- Overrides:
toJsonin classChatRequestMessage- Throws:
IOException
-
fromJson
public static ChatRequestAssistantMessage fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ChatRequestAssistantMessage from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ChatRequestAssistantMessage 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 ChatRequestAssistantMessage.
-