Class GoogleAiStudioServiceSettings.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<GoogleAiStudioServiceSettings.Builder>
co.elastic.clients.elasticsearch.inference.GoogleAiStudioServiceSettings.Builder
- All Implemented Interfaces:
WithJson<GoogleAiStudioServiceSettings.Builder>
,ObjectBuilder<GoogleAiStudioServiceSettings>
- Enclosing class:
- GoogleAiStudioServiceSettings
public static class GoogleAiStudioServiceSettings.Builder
extends WithJsonObjectBuilderBase<GoogleAiStudioServiceSettings.Builder>
implements ObjectBuilder<GoogleAiStudioServiceSettings>
Builder for
GoogleAiStudioServiceSettings
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRequired - A valid API key of your Google Gemini account.build()
Builds aGoogleAiStudioServiceSettings
.Required - The name of the model to use for the inference task.rateLimit
(RateLimitSetting value) This setting helps to minimize the number of rate limit errors returned from Google AI Studio.This setting helps to minimize the number of rate limit errors returned from Google AI Studio.protected GoogleAiStudioServiceSettings.Builder
self()
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
apiKey
Required - A valid API key of your Google Gemini account.API name:
api_key
-
modelId
Required - The name of the model to use for the inference task. Refer to the Google documentation for the list of supported models.API name:
model_id
-
rateLimit
This setting helps to minimize the number of rate limit errors returned from Google AI Studio. By default, thegoogleaistudio
service sets the number of requests allowed per minute to 360.API name:
rate_limit
-
rateLimit
public final GoogleAiStudioServiceSettings.Builder rateLimit(Function<RateLimitSetting.Builder, ObjectBuilder<RateLimitSetting>> fn) This setting helps to minimize the number of rate limit errors returned from Google AI Studio. By default, thegoogleaistudio
service sets the number of requests allowed per minute to 360.API name:
rate_limit
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<GoogleAiStudioServiceSettings.Builder>
-
build
Builds aGoogleAiStudioServiceSettings
.- Specified by:
build
in interfaceObjectBuilder<GoogleAiStudioServiceSettings>
- Throws:
NullPointerException
- if some of the required fields are null.
-