Package akka.javasdk.agent
Record Class ModelProvider.MistralAi
- All Implemented Interfaces:
ModelProvider
- Enclosing interface:
ModelProvider
public static record ModelProvider.MistralAi(String apiKey, String modelName, String baseUrl, double temperature, double topP, int maxTokens, boolean safePrompt, int randomSeed, double frequencyPenalty, double presencePenalty, List<String> stopSequences, boolean thinking, Duration connectionTimeout, Duration responseTimeout, int maxRetries, List<akka.http.javadsl.model.HttpHeader> additionalModelRequestHeaders)
extends Record
implements ModelProvider
Settings for the Mistral AI Large Language Model provider.
-
Nested Class Summary
Nested classes/interfaces inherited from interface akka.javasdk.agent.ModelProvider
ModelProvider.Anthropic, ModelProvider.AzureOpenAi, ModelProvider.Bedrock, ModelProvider.BedrockPromptCachePlacement, ModelProvider.Custom, ModelProvider.FromConfig, ModelProvider.GoogleAIGemini, ModelProvider.HuggingFace, ModelProvider.LocalAI, ModelProvider.MistralAi, ModelProvider.Ollama, ModelProvider.OpenAi, ModelProvider.VertexAi -
Constructor Summary
ConstructorsConstructorDescriptionMistralAi(String apiKey, String modelName, String baseUrl, double temperature, double topP, int maxTokens, boolean safePrompt, int randomSeed, double frequencyPenalty, double presencePenalty, List<String> stopSequences, boolean thinking, Duration connectionTimeout, Duration responseTimeout, int maxRetries, List<akka.http.javadsl.model.HttpHeader> additionalModelRequestHeaders) Creates an instance of aMistralAirecord class. -
Method Summary
Modifier and TypeMethodDescriptionList<akka.http.javadsl.model.HttpHeader> Returns the value of theadditionalModelRequestHeadersrecord component.apiKey()Returns the value of theapiKeyrecord component.baseUrl()Returns the value of thebaseUrlrecord component.Returns the value of theconnectionTimeoutrecord component.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of thefrequencyPenaltyrecord component.static ModelProvider.MistralAifromConfig(com.typesafe.config.Config config) final inthashCode()Returns a hash code value for this object.intReturns the value of themaxRetriesrecord component.intReturns the value of themaxTokensrecord component.Returns the value of themodelNamerecord component.doubleReturns the value of thepresencePenaltyrecord component.intReturns the value of therandomSeedrecord component.Returns the value of theresponseTimeoutrecord component.booleanReturns the value of thesafePromptrecord component.Returns the value of thestopSequencesrecord component.doubleReturns the value of thetemperaturerecord component.booleanthinking()Returns the value of thethinkingrecord component.doubletopP()Returns the value of thetopPrecord component.final StringtoString()Returns a string representation of this record class.withAdditionalModelRequestHeaders(List<akka.http.javadsl.model.HttpHeader> additionalModelRequestHeaders) withApiKey(String apiKey) withBaseUrl(String baseUrl) withConnectionTimeout(Duration connectionTimeout) withFrequencyPenalty(double frequencyPenalty) withMaxRetries(int maxRetries) withMaxTokens(int maxTokens) withModelName(String modelName) withPresencePenalty(double presencePenalty) withRandomSeed(int randomSeed) withResponseTimeout(Duration responseTimeout) withSafePrompt(boolean safePrompt) withStopSequences(List<String> stopSequences) withTemperature(double temperature) withThinking(boolean thinking) withTopP(double topP)
-
Constructor Details
-
MistralAi
public MistralAi(String apiKey, String modelName, String baseUrl, double temperature, double topP, int maxTokens, boolean safePrompt, int randomSeed, double frequencyPenalty, double presencePenalty, List<String> stopSequences, boolean thinking, Duration connectionTimeout, Duration responseTimeout, int maxRetries, List<akka.http.javadsl.model.HttpHeader> additionalModelRequestHeaders) Creates an instance of aMistralAirecord class.- Parameters:
apiKey- the value for theapiKeyrecord componentmodelName- the value for themodelNamerecord componentbaseUrl- the value for thebaseUrlrecord componenttemperature- the value for thetemperaturerecord componenttopP- the value for thetopPrecord componentmaxTokens- the value for themaxTokensrecord componentsafePrompt- the value for thesafePromptrecord componentrandomSeed- the value for therandomSeedrecord componentfrequencyPenalty- the value for thefrequencyPenaltyrecord componentpresencePenalty- the value for thepresencePenaltyrecord componentstopSequences- the value for thestopSequencesrecord componentthinking- the value for thethinkingrecord componentconnectionTimeout- the value for theconnectionTimeoutrecord componentresponseTimeout- the value for theresponseTimeoutrecord componentmaxRetries- the value for themaxRetriesrecord componentadditionalModelRequestHeaders- the value for theadditionalModelRequestHeadersrecord component
-
-
Method Details
-
fromConfig
-
withApiKey
-
withModelName
-
withBaseUrl
-
withTemperature
-
withTopP
-
withMaxTokens
-
withSafePrompt
-
withRandomSeed
-
withFrequencyPenalty
-
withPresencePenalty
-
withStopSequences
-
withThinking
-
withConnectionTimeout
-
withResponseTimeout
-
withMaxRetries
-
withAdditionalModelRequestHeaders
public ModelProvider.MistralAi withAdditionalModelRequestHeaders(List<akka.http.javadsl.model.HttpHeader> additionalModelRequestHeaders) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
apiKey
Returns the value of theapiKeyrecord component.- Returns:
- the value of the
apiKeyrecord component
-
modelName
Returns the value of themodelNamerecord component.- Returns:
- the value of the
modelNamerecord component
-
baseUrl
Returns the value of thebaseUrlrecord component.- Returns:
- the value of the
baseUrlrecord component
-
temperature
public double temperature()Returns the value of thetemperaturerecord component.- Returns:
- the value of the
temperaturerecord component
-
topP
public double topP()Returns the value of thetopPrecord component.- Returns:
- the value of the
topPrecord component
-
maxTokens
public int maxTokens()Returns the value of themaxTokensrecord component.- Returns:
- the value of the
maxTokensrecord component
-
safePrompt
public boolean safePrompt()Returns the value of thesafePromptrecord component.- Returns:
- the value of the
safePromptrecord component
-
randomSeed
public int randomSeed()Returns the value of therandomSeedrecord component.- Returns:
- the value of the
randomSeedrecord component
-
frequencyPenalty
public double frequencyPenalty()Returns the value of thefrequencyPenaltyrecord component.- Returns:
- the value of the
frequencyPenaltyrecord component
-
presencePenalty
public double presencePenalty()Returns the value of thepresencePenaltyrecord component.- Returns:
- the value of the
presencePenaltyrecord component
-
stopSequences
Returns the value of thestopSequencesrecord component.- Returns:
- the value of the
stopSequencesrecord component
-
thinking
public boolean thinking()Returns the value of thethinkingrecord component.- Returns:
- the value of the
thinkingrecord component
-
connectionTimeout
Returns the value of theconnectionTimeoutrecord component.- Returns:
- the value of the
connectionTimeoutrecord component
-
responseTimeout
Returns the value of theresponseTimeoutrecord component.- Returns:
- the value of the
responseTimeoutrecord component
-
maxRetries
public int maxRetries()Returns the value of themaxRetriesrecord component.- Returns:
- the value of the
maxRetriesrecord component
-
additionalModelRequestHeaders
Returns the value of theadditionalModelRequestHeadersrecord component.- Returns:
- the value of the
additionalModelRequestHeadersrecord component
-