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:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<GoogleVertexAIServiceSettings>Json deserializer forGoogleVertexAIServiceSettings -
Method Summary
Modifier and TypeMethodDescriptionfinal IntegerFor atext_embeddingtask, the number of dimensions the resulting output embeddings should have.final Stringlocation()The name of the location to use for the inference task for the Google Vertex AI inference task.final StringmodelId()The name of the model to use for the inference task.final StringThe name of the project to use for the Google Vertex AI inference task.provider()The name of the Google Model Garden Provider forcompletionandchat_completiontasks.final RateLimitSettingThis setting helps to minimize the number of rate limit errors returned from Google Vertex AI.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) final StringRequired - A valid service account in JSON format for the Google Vertex AI API.protected static voidsetupGoogleVertexAIServiceSettingsDeserializer(ObjectDeserializer<GoogleVertexAIServiceSettings.Builder> op) final StringThe URL for streamingcompletionandchat_completionrequests to a Google Model Garden provider endpoint.toString()final Stringurl()The URL for non-streamingcompletionrequests to a Google Model Garden provider endpoint.
-
Field Details
-
_DESERIALIZER
Json deserializer forGoogleVertexAIServiceSettings
-
-
Method Details
-
of
-
provider
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 -
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 -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupGoogleVertexAIServiceSettingsDeserializer
protected static void setupGoogleVertexAIServiceSettingsDeserializer(ObjectDeserializer<GoogleVertexAIServiceSettings.Builder> op)
-