Package com.azure.ai.inference.models
Class EmbeddingInput
java.lang.Object
com.azure.ai.inference.models.EmbeddingInput
- All Implemented Interfaces:
com.azure.json.JsonSerializable<EmbeddingInput>
public final class EmbeddingInput
extends Object
implements com.azure.json.JsonSerializable<EmbeddingInput>
Represents an image with optional text.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic EmbeddingInput
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of EmbeddingInput from the JsonReader.getImage()
Get the image property: The input image, in PNG format.getText()
Get the text property: Optional.Set the text property: Optional.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
-
Constructor Details
-
EmbeddingInput
Creates an instance of EmbeddingInput class.- Parameters:
image
- the image value to set.
-
-
Method Details
-
getImage
Get the image property: The input image, in PNG format.- Returns:
- the image value.
-
getText
Get the text property: Optional. The text input to feed into the model (like DINO, CLIP). Returns a 422 error if the model doesn't support the value or parameter.- Returns:
- the text value.
-
setText
Set the text property: Optional. The text input to feed into the model (like DINO, CLIP). Returns a 422 error if the model doesn't support the value or parameter.- Parameters:
text
- the text value to set.- Returns:
- the EmbeddingInput object itself.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<EmbeddingInput>
- Throws:
IOException
-
fromJson
Reads an instance of EmbeddingInput from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of EmbeddingInput 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 EmbeddingInput.
-