Class EmbedContentResponse

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.EmbedContentResponse

public abstract class EmbedContentResponse extends JsonSerializable
Response for the embed_content method.
  • Constructor Details

    • EmbedContentResponse

      public EmbedContentResponse()
  • Method Details

    • sdkHttpResponse

      public abstract Optional<HttpResponse> sdkHttpResponse()
      Used to retain the full HTTP response.
    • embeddings

      public abstract Optional<List<ContentEmbedding>> embeddings()
      The embeddings for each request, in the same order as provided in the batch request.
    • metadata

      public abstract Optional<EmbedContentMetadata> metadata()
      Gemini platform only. Metadata about the request.
    • truncated

      public abstract Optional<Boolean> truncated()
      Whether the input content was truncated before generating the embedding. This field is not supported in Gemini API.
    • usageMetadata

      public abstract Optional<UsageMetadata> usageMetadata()
      Usage metadata about the response(s).
    • builder

      public static EmbedContentResponse.Builder builder()
      Instantiates a builder for EmbedContentResponse.
    • toBuilder

      public abstract EmbedContentResponse.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static EmbedContentResponse fromJson(String jsonString)
      Deserializes a JSON string to a EmbedContentResponse object.