Class FireworksAIServiceSettings.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<FireworksAIServiceSettings.Builder>
co.elastic.clients.elasticsearch.inference.FireworksAIServiceSettings.Builder
- All Implemented Interfaces:
WithJson<FireworksAIServiceSettings.Builder>,ObjectBuilder<FireworksAIServiceSettings>
- Enclosing class:
- FireworksAIServiceSettings
public static class FireworksAIServiceSettings.Builder
extends WithJsonObjectBuilderBase<FireworksAIServiceSettings.Builder>
implements ObjectBuilder<FireworksAIServiceSettings>
Builder for
FireworksAIServiceSettings.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRequired - A valid API key for your Fireworks AI account.build()Builds aFireworksAIServiceSettings.dimensions(Integer value) For atext_embeddingtask, the number of dimensions the resulting output embeddings should have.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 Fireworks AI API.This setting helps to minimize the number of rate limit errors returned from the Fireworks AI API.protected FireworksAIServiceSettings.Builderself()For atext_embeddingtask, the similarity measure.The URL endpoint to use for the requests.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
-
apiKey
Required - A valid API key for your Fireworks AI account. You can find or create your API keys in the Fireworks AI dashboard.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 -
modelId
Required - The name of the model to use for the inference task. Refer to the Fireworks AI documentation for the list of available models for chat completion, completion, and text embedding. For text embedding, supported models include the Qwen3 embedding family (e.g.fireworks/qwen3-embedding-8b) and other models in the Fireworks model library.API name:
model_id -
url
The URL endpoint to use for the requests. If not provided, the default Fireworks AI API endpoint is used.API name:
url -
dimensions
For atext_embeddingtask, the number of dimensions the resulting output embeddings should have. Variable-length embeddings are supported via this parameter.API name:
dimensions -
similarity
public final FireworksAIServiceSettings.Builder similarity(@Nullable FireworksAISimilarityType value) For atext_embeddingtask, the similarity measure. One of cosine, dot_product, l2_norm.API name:
similarity -
rateLimit
This setting helps to minimize the number of rate limit errors returned from the Fireworks AI API. Rate limit grouping is per API key only. By default, thefireworksaiservice sets the number of requests allowed per minute to 6000.API name:
rate_limit -
rateLimit
public final FireworksAIServiceSettings.Builder rateLimit(Function<RateLimitSetting.Builder, ObjectBuilder<RateLimitSetting>> fn) This setting helps to minimize the number of rate limit errors returned from the Fireworks AI API. Rate limit grouping is per API key only. By default, thefireworksaiservice sets the number of requests allowed per minute to 6000.API name:
rate_limit -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<FireworksAIServiceSettings.Builder>
-
build
Builds aFireworksAIServiceSettings.- Specified by:
buildin interfaceObjectBuilder<FireworksAIServiceSettings>- Throws:
NullPointerException- if some of the required fields are null.
-