Class MistralAiBatchChatModel.Builder
java.lang.Object
dev.langchain4j.model.mistralai.MistralAiBatchChatModel.Builder
- Enclosing class:
MistralAiBatchChatModel
-
Method Summary
Modifier and TypeMethodDescriptionSets the Mistral API key used to authenticate requests.Sets the base URL of the Mistral API.build()customHeaders(Supplier<Map<String, String>> customHeadersSupplier) customHeaders(Map<String, String> customHeaders) defaultRequestParameters(ChatRequestParameters defaultRequestParameters) Sets common defaultChatRequestParameters; explicit builder setters take precedence over these.frequencyPenalty(Double frequencyPenalty) httpClientBuilder(HttpClientBuilder httpClientBuilder) Sets a customHttpClientBuilderfor the underlying HTTP client.logger(org.slf4j.Logger logger) logRequests(Boolean logRequests) logResponses(Boolean logResponses) maxRetries(Integer maxRetries) Sets the number of times to retry a request on transient errors.Sets the model that every request in the batch runs against (one model per job).presencePenalty(Double presencePenalty) randomSeed(Integer randomSeed) Sets the seed for deterministic sampling.responseFormat(ResponseFormat responseFormat) returnThinking(Boolean returnThinking) safePrompt(Boolean safePrompt) Injects a safety prompt in front of all conversations whentrue.sendThinking(Boolean sendThinking) stopSequences(List<String> stopSequences) strictJsonSchema(Boolean strictJsonSchema) temperature(Double temperature) Sets the HTTP request timeout for calls to the Mistral API.timeoutHours(Integer timeoutHours) Sets the job timeout in hours, after which unprocessed requests expire.
-
Method Details
-
httpClientBuilder
Sets a customHttpClientBuilderfor the underlying HTTP client.- Returns:
this
-
baseUrl
Sets the base URL of the Mistral API. Defaults tohttps://api.mistral.ai/v1.- Returns:
this
-
apiKey
Sets the Mistral API key used to authenticate requests.- Returns:
this
-
modelName
Sets the model that every request in the batch runs against (one model per job).- Returns:
this
-
temperature
- Returns:
this
-
topP
- Returns:
this
-
maxTokens
- Returns:
this
-
frequencyPenalty
- Returns:
this
-
presencePenalty
- Returns:
this
-
stopSequences
- Returns:
this
-
responseFormat
- Returns:
this
-
safePrompt
Injects a safety prompt in front of all conversations whentrue.- Returns:
this
-
randomSeed
Sets the seed for deterministic sampling.- Returns:
this
-
sendThinking
- Returns:
this
-
returnThinking
- Returns:
this
-
strictJsonSchema
- Returns:
this
-
timeoutHours
Sets the job timeout in hours, after which unprocessed requests expire.- Returns:
this
-
timeout
Sets the HTTP request timeout for calls to the Mistral API.- Returns:
this
-
maxRetries
Sets the number of times to retry a request on transient errors. Defaults to2.- Returns:
this
-
logRequests
- Returns:
this
-
logResponses
- Returns:
this
-
logger
- Returns:
this
-
customHeaders
- Returns:
this
-
customHeaders
public MistralAiBatchChatModel.Builder customHeaders(Supplier<Map<String, String>> customHeadersSupplier) - Returns:
this
-
defaultRequestParameters
public MistralAiBatchChatModel.Builder defaultRequestParameters(ChatRequestParameters defaultRequestParameters) Sets common defaultChatRequestParameters; explicit builder setters take precedence over these.- Returns:
this
-
build
-