Package dev.langchain4j.model.openai
Class OpenAiChatModel.OpenAiChatModelBuilder
java.lang.Object
dev.langchain4j.model.openai.OpenAiChatModel.OpenAiChatModelBuilder
- Enclosing class:
OpenAiChatModel
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
customHeaders
(Map<String, String> customHeaders) defaultRequestParameters
(ChatRequestParameters parameters) Sets default commonChatRequestParameters
or OpenAI-specificOpenAiChatRequestParameters
.frequencyPenalty
(Double frequencyPenalty) listeners
(List<ChatModelListener> listeners) logRequests
(Boolean logRequests) logResponses
(Boolean logResponses) maxCompletionTokens
(Integer maxCompletionTokens) maxRetries
(Integer maxRetries) modelName
(OpenAiChatModelName modelName) organizationId
(String organizationId) parallelToolCalls
(Boolean parallelToolCalls) presencePenalty
(Double presencePenalty) responseFormat
(String responseFormat) serviceTier
(String serviceTier) strictJsonSchema
(Boolean strictJsonSchema) strictTools
(Boolean strictTools) temperature
(Double temperature) toString()
-
Constructor Details
-
OpenAiChatModelBuilder
public OpenAiChatModelBuilder()
-
-
Method Details
-
defaultRequestParameters
public OpenAiChatModel.OpenAiChatModelBuilder defaultRequestParameters(ChatRequestParameters parameters) Sets default commonChatRequestParameters
or OpenAI-specificOpenAiChatRequestParameters
.
When a parameter is set via an individual builder method (e.g.,modelName(String)
), its value takes precedence over the same parameter set viaChatRequestParameters
. -
modelName
-
modelName
-
baseUrl
-
apiKey
-
organizationId
-
temperature
-
topP
-
stop
-
maxTokens
-
maxCompletionTokens
-
presencePenalty
-
frequencyPenalty
-
logitBias
-
responseFormat
-
strictJsonSchema
-
seed
-
user
-
strictTools
-
parallelToolCalls
-
store
-
metadata
-
serviceTier
-
timeout
-
maxRetries
-
proxy
-
logRequests
-
logResponses
-
tokenizer
-
customHeaders
-
listeners
-
build
-
toString
-