Class GoogleVertexAIServiceSettings.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<GoogleVertexAIServiceSettings.Builder>
co.elastic.clients.elasticsearch.inference.GoogleVertexAIServiceSettings.Builder
- All Implemented Interfaces:
WithJson<GoogleVertexAIServiceSettings.Builder>,ObjectBuilder<GoogleVertexAIServiceSettings>
- Enclosing class:
- GoogleVertexAIServiceSettings
public static class GoogleVertexAIServiceSettings.Builder
extends WithJsonObjectBuilderBase<GoogleVertexAIServiceSettings.Builder>
implements ObjectBuilder<GoogleVertexAIServiceSettings>
Builder for
GoogleVertexAIServiceSettings.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aGoogleVertexAIServiceSettings.dimensions(Integer value) For atext_embeddingtask, the number of dimensions the resulting output embeddings should have.The name of the location to use for the inference task for the Google Vertex AI inference task.The name of the model to use for the inference task.The name of the project to use for the Google Vertex AI inference task.The name of the Google Model Garden Provider forcompletionandchat_completiontasks.rateLimit(RateLimitSetting value) This setting helps to minimize the number of rate limit errors returned from Google Vertex AI.This setting helps to minimize the number of rate limit errors returned from Google Vertex AI.protected GoogleVertexAIServiceSettings.Builderself()serviceAccountJson(String value) Required - A valid service account in JSON format for the Google Vertex AI API.streamingUrl(String value) The URL for streamingcompletionandchat_completionrequests to a Google Model Garden provider endpoint.The URL for non-streamingcompletionrequests to a Google Model Garden provider endpoint.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
provider
public final GoogleVertexAIServiceSettings.Builder provider(@Nullable GoogleModelGardenProvider value) The name of the Google Model Garden Provider forcompletionandchat_completiontasks. In order for a Google Model Garden endpoint to be usedprovidermust be defined and be other thangoogle. Modes:- Google Model Garden (third-party models): set
providerto a supported non-googlevalue and provideurland/orstreaming_url. - Google Vertex AI: omit
provideror set it togoogle. In this mode, do not seturlorstreaming_urland Elastic will construct the endpoint url fromlocation,model_id, andproject_idparameters.
API name:
provider - Google Model Garden (third-party models): set
-
url
The URL for non-streamingcompletionrequests to a Google Model Garden provider endpoint. If bothurlandstreaming_urlare provided, each is used for its respective mode. Ifstreaming_urlis not provided,urlis also used for streamingcompletionandchat_completion. Ifprovideris not provided or set togoogle(Google Vertex AI), do not seturl(orstreaming_url). At least one ofurlorstreaming_urlmust be provided for Google Model Garden endpoint usage.API name:
url -
streamingUrl
The URL for streamingcompletionandchat_completionrequests to a Google Model Garden provider endpoint. If bothstreaming_urlandurlare provided, each is used for its respective mode. Ifurlis not provided,streaming_urlis also used for non-streamingcompletionrequests. Ifprovideris not provided or set togoogle(Google Vertex AI), do not setstreaming_url(orurl). At least one ofstreaming_urlorurlmust be provided for Google Model Garden endpoint usage.API name:
streaming_url -
location
The name of the location to use for the inference task for the Google Vertex AI inference task. For Google Vertex AI, whenprovideris omitted orgooglelocationis mandatory. For Google Model Garden'scompletionandchat_completiontasks, whenprovideris a supported non-googlevalue -locationis ignored. Refer to the Google documentation for the list of supported locations.API name:
location -
modelId
The name of the model to use for the inference task. For Google Vertex AImodel_idis mandatory. For Google Model Garden'scompletionandchat_completiontasks, whenprovideris a supported non-googlevalue -model_idwill 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
The name of the project to use for the Google Vertex AI inference task. For Google Vertex AIproject_idis mandatory. For Google Model Garden'scompletionandchat_completiontasks, whenprovideris a supported non-googlevalue -project_idis ignored.API name:
project_id -
rateLimit
This setting helps to minimize the number of rate limit errors returned from Google Vertex AI. By default, thegooglevertexaiservice sets the number of requests allowed per minute to 30.000.API name:
rate_limit -
rateLimit
public final GoogleVertexAIServiceSettings.Builder rateLimit(Function<RateLimitSetting.Builder, ObjectBuilder<RateLimitSetting>> fn) This setting helps to minimize the number of rate limit errors returned from Google Vertex AI. By default, thegooglevertexaiservice sets the number of requests allowed per minute to 30.000.API name:
rate_limit -
serviceAccountJson
Required - A valid service account in JSON format for the Google Vertex AI API.API name:
service_account_json -
dimensions
For atext_embeddingtask, 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 -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<GoogleVertexAIServiceSettings.Builder>
-
build
Builds aGoogleVertexAIServiceSettings.- Specified by:
buildin interfaceObjectBuilder<GoogleVertexAIServiceSettings>- Throws:
NullPointerException- if some of the required fields are null.
-