Class MessageTextFileCitationAnnotation
java.lang.Object
com.azure.ai.agents.persistent.models.MessageTextAnnotation
com.azure.ai.agents.persistent.models.MessageTextFileCitationAnnotation
- All Implemented Interfaces:
com.azure.json.JsonSerializable<MessageTextAnnotation>
A citation within the message that points to a specific quote from a specific File associated with the agent or the
message. Generated when the agent uses the 'file_search' tool to search files.
-
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of MessageTextFileCitationAnnotation from the JsonReader.Get the endIndex property: The last text index associated with this text annotation.Get the fileCitation property: A citation within the message that points to a specific quote from a specific file.Get the startIndex property: The first text index associated with this text annotation.getType()Get the type property: The object type.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class com.azure.ai.agents.persistent.models.MessageTextAnnotation
getTextMethods 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
-
Method Details
-
getType
Get the type property: The object type.- Overrides:
getTypein classMessageTextAnnotation- Returns:
- the type value.
-
getFileCitation
Get the fileCitation property: A citation within the message that points to a specific quote from a specific file. Generated when the agent uses the "file_search" tool to search files.- Returns:
- the fileCitation value.
-
getStartIndex
Get the startIndex property: The first text index associated with this text annotation.- Returns:
- the startIndex value.
-
getEndIndex
Get the endIndex property: The last text index associated with this text annotation.- Returns:
- the endIndex value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<MessageTextAnnotation>- Overrides:
toJsonin classMessageTextAnnotation- Throws:
IOException
-
fromJson
public static MessageTextFileCitationAnnotation fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of MessageTextFileCitationAnnotation from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of MessageTextFileCitationAnnotation 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 MessageTextFileCitationAnnotation.
-