Class OpenAiDecisionRequestParameters.Builder
java.lang.Object
dev.langchain4j.model.decision.request.DefaultDecisionRequestParameters.Builder<OpenAiDecisionRequestParameters.Builder>
dev.langchain4j.model.openai.OpenAiDecisionRequestParameters.Builder
- Enclosing class:
OpenAiDecisionRequestParameters
public static class OpenAiDecisionRequestParameters.Builder
extends DefaultDecisionRequestParameters.Builder<OpenAiDecisionRequestParameters.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 thatOpenAiDecisionModeldoes 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
Description copied from class:DefaultDecisionRequestParameters.BuilderCopies the populated parameters from the given instance into this builder.- Overrides:
overrideWithin classDefaultDecisionRequestParameters.Builder<OpenAiDecisionRequestParameters.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
OpenAiDecisionModelbuilder for this request. See the prompt caching guide. -
customParameters
public OpenAiDecisionRequestParameters.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 thatOpenAiDecisionModeldoes not support yet. A custom parameter with the same name as a parameter thatOpenAiDecisionModelsends replaces it.If not empty, they replace (are not merged with) the custom parameters set on the
OpenAiDecisionModelbuilder for this request. If not set or empty, the custom parameters of the builder are used. -
build
- Overrides:
buildin classDefaultDecisionRequestParameters.Builder<OpenAiDecisionRequestParameters.Builder>
-