Class OpenAiOfficialBatchChatModel.Builder
java.lang.Object
dev.langchain4j.model.openaiofficial.OpenAiOfficialBatchChatModel.Builder
- Enclosing class:
OpenAiOfficialBatchChatModel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionazureOpenAIServiceVersion(com.openai.azure.AzureOpenAIServiceVersion azureOpenAIServiceVersion) batchMetadata(Map<String, String> batchMetadata) Sets the metadata attached to the batch itself, which OpenAI returns when the batch is retrieved or listed.build()completionWindow(String completionWindow) Sets the time frame within which the batch should be processed.credential(com.openai.credential.Credential credential) customHeaders(Map<String, String> customHeaders) defaultRequestParameters(ChatRequestParameters parameters) Sets default commonChatRequestParametersor OpenAI-specificOpenAiOfficialChatRequestParameters.frequencyPenalty(Double frequencyPenalty) inputFileExpiresAfter(Duration inputFileExpiresAfter) Sets how long after upload the JSONL input file expires.isGitHubModels(boolean isGitHubModels) isMicrosoftFoundry(boolean isMicrosoftFoundry) maxCompletionTokens(Integer maxCompletionTokens) maxRetries(Integer maxRetries) Sets the metadata sent with every chat request in the batch.microsoftFoundryDeploymentName(String microsoftFoundryDeploymentName) modelName(com.openai.models.ChatModel modelName) openAIClient(com.openai.client.OpenAIClient openAIClient) organizationId(String organizationId) outputExpiresAfter(Duration outputExpiresAfter) Sets how long after the output file is created it, and the error file, expire.parallelToolCalls(Boolean parallelToolCalls) presencePenalty(Double presencePenalty) responseFormat(String responseFormat) serviceTier(String serviceTier) strictJsonSchema(Boolean strictJsonSchema) strictTools(Boolean strictTools) temperature(Double temperature)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
defaultRequestParameters
public OpenAiOfficialBatchChatModel.Builder defaultRequestParameters(ChatRequestParameters parameters) Sets default commonChatRequestParametersor OpenAI-specificOpenAiOfficialChatRequestParameters.
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
-
credential
-
microsoftFoundryDeploymentName
public OpenAiOfficialBatchChatModel.Builder microsoftFoundryDeploymentName(String microsoftFoundryDeploymentName) -
azureOpenAIServiceVersion
public OpenAiOfficialBatchChatModel.Builder azureOpenAIServiceVersion(com.openai.azure.AzureOpenAIServiceVersion azureOpenAIServiceVersion) -
organizationId
-
isGitHubModels
-
isMicrosoftFoundry
-
openAIClient
public OpenAiOfficialBatchChatModel.Builder openAIClient(com.openai.client.OpenAIClient openAIClient) -
temperature
-
topP
-
stop
-
maxCompletionTokens
-
presencePenalty
-
frequencyPenalty
-
logitBias
-
responseFormat
-
strictJsonSchema
-
seed
-
user
-
strictTools
-
parallelToolCalls
-
store
-
metadata
Sets the metadata sent with every chat request in the batch.- See Also:
-
serviceTier
-
completionWindow
Sets the time frame within which the batch should be processed. Defaults to24h, which is currently the only value accepted by OpenAI. -
batchMetadata
Sets the metadata attached to the batch itself, which OpenAI returns when the batch is retrieved or listed. This is distinct frommetadata(Map), which is sent with every chat request inside the batch. -
inputFileExpiresAfter
Sets how long after upload the JSONL input file expires. Not set by default, in which case the provider's own retention for batch input files applies and the file is kept until it is deleted. The accepted range is defined by the provider and differs between OpenAI and Azure OpenAI. Values are sent with a whole-second resolution. -
outputExpiresAfter
Sets how long after the output file is created it, and the error file, expire. Not set by default, in which case the provider's own retention applies. The accepted range is defined by the provider and differs between OpenAI and Azure OpenAI. Values are sent with a whole-second resolution. -
timeout
-
maxRetries
-
proxy
-
customHeaders
-
build
-