Class OpenAiOfficialDecisionModel.Builder
java.lang.Object
dev.langchain4j.model.openaiofficial.OpenAiOfficialDecisionModel.Builder
- Enclosing class:
OpenAiOfficialDecisionModel
- Since:
- 1.22.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()customHeaders(Map<String, String> customHeaders) listeners(DecisionModelListener... listeners) listeners(List<DecisionModelListener> listeners) maxRetries(Integer maxRetries) The number of retries of the OpenAI SDK for transient errors such as timeouts, rate limits and server errors.The model to use when a request does not specify one, for examplegpt-6-luna.openAIClient(com.openai.client.OpenAIClient openAIClient) Sets a preconfigured OpenAI client.organizationId(String organizationId) The timeout of a call.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
baseUrl
-
apiKey
-
organizationId
-
openAIClient
public OpenAiOfficialDecisionModel.Builder openAIClient(com.openai.client.OpenAIClient openAIClient) Sets a preconfigured OpenAI client. The other client settings (base URL, API key, timeout...) are then ignored. -
modelName
The model to use when a request does not specify one, for examplegpt-6-luna. The model name must be set either here or on each request. -
timeout
The timeout of a call. Default value is 60 seconds. -
maxRetries
The number of retries of the OpenAI SDK for transient errors such as timeouts, rate limits and server errors. Default value is 3. -
proxy
-
customHeaders
-
listeners
-
listeners
-
build
-