Class OpenAIFile
java.lang.Object
com.azure.ai.openai.assistants.models.OpenAIFile
- All Implemented Interfaces:
com.azure.json.JsonSerializable<OpenAIFile>
Represents an assistant that can call the model and use tools.
-
Method Summary
Modifier and TypeMethodDescriptionstatic OpenAIFile
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of OpenAIFile from the JsonReader.int
getBytes()
Get the bytes property: The size of the file, in bytes.Get the createdAt property: The Unix timestamp, in seconds, representing when this object was created.Get the filename property: The name of the file.getId()
Get the id property: The identifier, which can be referenced in API endpoints.Get the object property: The object type, which is always 'file'.Get the purpose property: The intended purpose of a file.Get the status property: The state of the file.Get the statusDetails property: The error message with details in case processing of this file failed.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) 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
-
Method Details
-
getObject
Get the object property: The object type, which is always 'file'.- Returns:
- the object value.
-
getId
Get the id property: The identifier, which can be referenced in API endpoints.- Returns:
- the id value.
-
getBytes
public int getBytes()Get the bytes property: The size of the file, in bytes.- Returns:
- the bytes value.
-
getFilename
Get the filename property: The name of the file.- Returns:
- the filename value.
-
getCreatedAt
Get the createdAt property: The Unix timestamp, in seconds, representing when this object was created.- Returns:
- the createdAt value.
-
getPurpose
Get the purpose property: The intended purpose of a file.- Returns:
- the purpose value.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<OpenAIFile>
- Throws:
IOException
-
fromJson
Reads an instance of OpenAIFile from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of OpenAIFile 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 OpenAIFile.
-
getStatus
Get the status property: The state of the file. This field is available in Azure OpenAI only.- Returns:
- the status value.
-
getStatusDetails
Get the statusDetails property: The error message with details in case processing of this file failed. This field is available in Azure OpenAI only.- Returns:
- the statusDetails value.
-