Class GroqServiceSettings.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<GroqServiceSettings.Builder>
co.elastic.clients.elasticsearch.inference.GroqServiceSettings.Builder
- All Implemented Interfaces:
WithJson<GroqServiceSettings.Builder>,ObjectBuilder<GroqServiceSettings>
- Enclosing class:
- GroqServiceSettings
public static class GroqServiceSettings.Builder
extends WithJsonObjectBuilderBase<GroqServiceSettings.Builder>
implements ObjectBuilder<GroqServiceSettings>
Builder for
GroqServiceSettings.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionA valid API key for accessing Groq API.build()Builds aGroqServiceSettings.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 the Groq API.This setting helps to minimize the number of rate limit errors returned from the Groq API.protected GroqServiceSettings.Builderself()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
-
modelId
Required - The name of the model to use for the inference task. Refer to the Groq model documentation for the list of supported models and versions. Service has been tested and confirmed to be working forcompletionandchat_completiontasks with the following models:llama-3.3-70b-versatile
API name:
model_id -
apiKey
A valid API key for accessing Groq API.IMPORTANT: You need to provide the API key only once, during the inference model creation. The get inference endpoint API does not retrieve your API key.
API name:
api_key -
rateLimit
This setting helps to minimize the number of rate limit errors returned from the Groq API. By default, thegroqservice sets the number of requests allowed per minute to 1000. Refer to Groq documentation for more details.API name:
rate_limit -
rateLimit
public final GroqServiceSettings.Builder rateLimit(Function<RateLimitSetting.Builder, ObjectBuilder<RateLimitSetting>> fn) This setting helps to minimize the number of rate limit errors returned from the Groq API. By default, thegroqservice sets the number of requests allowed per minute to 1000. Refer to Groq documentation for more details.API name:
rate_limit -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<GroqServiceSettings.Builder>
-
build
Builds aGroqServiceSettings.- Specified by:
buildin interfaceObjectBuilder<GroqServiceSettings>- Throws:
NullPointerException- if some of the required fields are null.
-