Class OpenAiOfficialDecisionRequestParameters.Builder
java.lang.Object
dev.langchain4j.model.decision.request.DefaultDecisionRequestParameters.Builder<OpenAiOfficialDecisionRequestParameters.Builder>
dev.langchain4j.model.openaiofficial.OpenAiOfficialDecisionRequestParameters.Builder
- Enclosing class:
OpenAiOfficialDecisionRequestParameters
public static class OpenAiOfficialDecisionRequestParameters.Builder
extends DefaultDecisionRequestParameters.Builder<OpenAiOfficialDecisionRequestParameters.Builder>
- Since:
- 1.23.0
-
Field Summary
Fields inherited from class DefaultDecisionRequestParameters.Builder
modelName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()customParameters(Map<String, Object> customParameters) Custom parameters added to the body of the request, for example to use a feature of the OpenAI Decisions API thatOpenAiOfficialDecisionModeldoes not support yet.overrideWith(DecisionRequestParameters parameters) Copies the populated parameters from the given instance into this builder.promptCacheKey(String promptCacheKey) A key that separates prompt caching between groups of requests, sent asprompt_cache_key.Methods inherited from class DefaultDecisionRequestParameters.Builder
modelName, self
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
overrideWith
public OpenAiOfficialDecisionRequestParameters.Builder overrideWith(DecisionRequestParameters parameters) Description copied from class:DefaultDecisionRequestParameters.BuilderCopies the populated parameters from the given instance into this builder.- Overrides:
overrideWithin classDefaultDecisionRequestParameters.Builder<OpenAiOfficialDecisionRequestParameters.Builder>- Parameters:
parameters- the parameters to copy, may benull.- Returns:
this.
-
promptCacheKey
A key that separates prompt caching between groups of requests, sent asprompt_cache_key. OpenAI caches the shared input of requests automatically, also without a key. With a key, only requests with the same key reuse each other's cached input, for example to keep cache reuse and the cached token counts separate per customer or user. Not set by default.If set, it replaces the key set on the
OpenAiOfficialDecisionModelbuilder for this request. See the prompt caching guide. -
customParameters
public OpenAiOfficialDecisionRequestParameters.Builder customParameters(Map<String, Object> customParameters) Custom parameters added to the body of the request, for example to use a feature of the OpenAI Decisions API thatOpenAiOfficialDecisionModeldoes not support yet. A custom parameter with the same name as a parameter thatOpenAiOfficialDecisionModelsends replaces it.If not empty, they replace (are not merged with) the custom parameters set on the
OpenAiOfficialDecisionModelbuilder for this request. If not set or empty, the custom parameters of the builder are used. -
build
- Overrides:
buildin classDefaultDecisionRequestParameters.Builder<OpenAiOfficialDecisionRequestParameters.Builder>
-