Class WatsonxServiceSettings.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<WatsonxServiceSettings.Builder>
co.elastic.clients.elasticsearch.inference.WatsonxServiceSettings.Builder
- All Implemented Interfaces:
WithJson<WatsonxServiceSettings.Builder>,ObjectBuilder<WatsonxServiceSettings>
- Enclosing class:
- WatsonxServiceSettings
public static class WatsonxServiceSettings.Builder
extends WithJsonObjectBuilderBase<WatsonxServiceSettings.Builder>
implements ObjectBuilder<WatsonxServiceSettings>
Builder for
WatsonxServiceSettings.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRequired - A valid API key of your Watsonx account.apiVersion(String value) Required - A version parameter that takes a version date in the format ofYYYY-MM-DD.build()Builds aWatsonxServiceSettings.Required - The name of the model to use for the inference task.Required - The identifier of the IBM Cloud project to use for the inference task.rateLimit(RateLimitSetting value) This setting helps to minimize the number of rate limit errors returned from Watsonx.This setting helps to minimize the number of rate limit errors returned from Watsonx.protected WatsonxServiceSettings.Builderself()Required - The URL of the inference endpoint that you created on Watsonx.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 of your Watsonx account. You can find your Watsonx API keys or you can create a new one on the API keys page.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. After creating the inference model, you cannot change the associated API key. If you want to use a different API key, delete the inference model and recreate it with the same name and the updated API key.
API name:
api_key -
apiVersion
Required - A version parameter that takes a version date in the format ofYYYY-MM-DD. For the active version data parameters, refer to the Wastonx documentation.API name:
api_version -
modelId
Required - The name of the model to use for the inference task. Refer to the IBM Embedding Models section in the Watsonx documentation for the list of available text embedding models.API name:
model_id -
projectId
Required - The identifier of the IBM Cloud project to use for the inference task.API name:
project_id -
rateLimit
This setting helps to minimize the number of rate limit errors returned from Watsonx. By default, thewatsonxaiservice sets the number of requests allowed per minute to 120.API name:
rate_limit -
rateLimit
public final WatsonxServiceSettings.Builder rateLimit(Function<RateLimitSetting.Builder, ObjectBuilder<RateLimitSetting>> fn) This setting helps to minimize the number of rate limit errors returned from Watsonx. By default, thewatsonxaiservice sets the number of requests allowed per minute to 120.API name:
rate_limit -
url
Required - The URL of the inference endpoint that you created on Watsonx.API name:
url -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<WatsonxServiceSettings.Builder>
-
build
Builds aWatsonxServiceSettings.- Specified by:
buildin interfaceObjectBuilder<WatsonxServiceSettings>- Throws:
NullPointerException- if some of the required fields are null.
-