Package com.azure.ai.openai.models
Class PredictionContent
java.lang.Object
com.azure.ai.openai.models.PredictionContent
- All Implemented Interfaces:
com.azure.json.JsonSerializable<PredictionContent>
public final class PredictionContent
extends Object
implements com.azure.json.JsonSerializable<PredictionContent>
Static predicted output content, such as the content of a text file that is being regenerated.
-
Constructor Summary
ConstructorsConstructorDescriptionPredictionContent(com.azure.core.util.BinaryData content) Creates an instance of PredictionContent class. -
Method Summary
Modifier and TypeMethodDescriptionstatic PredictionContentfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of PredictionContent from the JsonReader.com.azure.core.util.BinaryDataGet the content property: The content that should be matched when generating a model response.getType()Get the type property: The type of the predicted content you want to provide.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
-
PredictionContent
public PredictionContent(com.azure.core.util.BinaryData content) Creates an instance of PredictionContent class.- Parameters:
content- the content value to set.
-
-
Method Details
-
getType
Get the type property: The type of the predicted content you want to provide. This type is currently always `content`.- Returns:
- the type value.
-
getContent
public com.azure.core.util.BinaryData getContent()Get the content property: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly.- Returns:
- the content value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<PredictionContent>- Throws:
IOException
-
fromJson
Reads an instance of PredictionContent from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of PredictionContent 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 PredictionContent.
-