Class GoogleVertexAIServiceSettings

java.lang.Object
co.elastic.clients.elasticsearch.inference.GoogleVertexAIServiceSettings
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable public class GoogleVertexAIServiceSettings extends Object implements JsonpSerializable
See Also:
  • Field Details

  • Method Details

    • of

    • provider

      @Nullable public final GoogleModelGardenProvider provider()
      The name of the Google Model Garden Provider for completion and chat_completion tasks. In order for a Google Model Garden endpoint to be used provider must be defined and be other than google. Modes:
      • Google Model Garden (third-party models): set provider to a supported non-google value and provide url and/or streaming_url.
      • Google Vertex AI: omit provider or set it to google. In this mode, do not set url or streaming_url and Elastic will construct the endpoint url from location, model_id, and project_id parameters.

      API name: provider

    • url

      @Nullable public final String url()
      The URL for non-streaming completion requests to a Google Model Garden provider endpoint. If both url and streaming_url are provided, each is used for its respective mode. If streaming_url is not provided, url is also used for streaming completion and chat_completion. If provider is not provided or set to google (Google Vertex AI), do not set url (or streaming_url). At least one of url or streaming_url must be provided for Google Model Garden endpoint usage.

      API name: url

    • streamingUrl

      @Nullable public final String streamingUrl()
      The URL for streaming completion and chat_completion requests to a Google Model Garden provider endpoint. If both streaming_url and url are provided, each is used for its respective mode. If url is not provided, streaming_url is also used for non-streaming completion requests. If provider is not provided or set to google (Google Vertex AI), do not set streaming_url (or url). At least one of streaming_url or url must be provided for Google Model Garden endpoint usage.

      API name: streaming_url

    • location

      @Nullable public final String location()
      The name of the location to use for the inference task for the Google Vertex AI inference task. For Google Vertex AI, when provider is omitted or google location is mandatory. For Google Model Garden's completion and chat_completion tasks, when provider is a supported non-google value - location is ignored. Refer to the Google documentation for the list of supported locations.

      API name: location

    • modelId

      @Nullable public final String modelId()
      The name of the model to use for the inference task. For Google Vertex AI model_id is mandatory. For Google Model Garden's completion and chat_completion tasks, when provider is a supported non-google value - model_id will be used for some providers that require it, otherwise - ignored. Refer to the Google documentation for the list of supported models for Google Vertex AI.

      API name: model_id

    • projectId

      @Nullable public final String projectId()
      The name of the project to use for the Google Vertex AI inference task. For Google Vertex AI project_id is mandatory. For Google Model Garden's completion and chat_completion tasks, when provider is a supported non-google value - project_id is ignored.

      API name: project_id

    • rateLimit

      @Nullable public final RateLimitSetting rateLimit()
      This setting helps to minimize the number of rate limit errors returned from Google Vertex AI. By default, the googlevertexai service sets the number of requests allowed per minute to 30.000.

      API name: rate_limit

    • serviceAccountJson

      public final String serviceAccountJson()
      Required - A valid service account in JSON format for the Google Vertex AI API.

      API name: service_account_json

    • dimensions

      @Nullable public final Integer dimensions()
      For a text_embedding task, the number of dimensions the resulting output embeddings should have. By default, the model's standard output dimension is used. Refer to the Google documentation for more information.

      API name: dimensions

    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setupGoogleVertexAIServiceSettingsDeserializer

      protected static void setupGoogleVertexAIServiceSettingsDeserializer(ObjectDeserializer<GoogleVertexAIServiceSettings.Builder> op)