Package com.azure.ai.inference
Class ImageEmbeddingsClient
java.lang.Object
com.azure.ai.inference.ImageEmbeddingsClient
Initializes a new instance of the synchronous ImageEmbeddingsClient type.
-
Method Summary
Modifier and TypeMethodDescriptionembed
(List<ImageEmbeddingInput> inputs) Return the embedding vectors for given text prompts.
-
Method Details
-
embed
Return the embedding vectors for given text prompts. The method makes a REST API call to the `/embeddings` route on the given endpoint.- Parameters:
inputs
- ImageEmbeddingInput instances to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays.- Returns:
- representation of the response data from an embeddings request. Embeddings measure the relatedness of text strings and are commonly used for search, clustering, recommendations, and other similar scenarios.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-