Package dev.langchain4j.model.mistralai
Class MistralAiModels
java.lang.Object
dev.langchain4j.model.mistralai.MistralAiModels
Represents a collection of Mistral AI models.
You can find description of parameters here.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondev.langchain4j.model.output.Response<List<MistralAiModelCard>> Retrieves the list of all available models.builder()static MistralAiModelswithApiKey(String apiKey) Creates a new instance of MistralAiModels with the specified API key.
-
Constructor Details
-
MistralAiModels
public MistralAiModels(String baseUrl, String apiKey, Duration timeout, Boolean logRequests, Boolean logResponses, Integer maxRetries) Constructs a new instance of MistralAiModels.- Parameters:
baseUrl- the base URL of the Mistral AI API. It uses the default value if not specifiedapiKey- the API key for authenticationtimeout- the timeout duration for API requests. It uses the default value of 60 seconds if not specifiedlogRequests- a flag whether to log raw HTTP requestslogResponses- a flag whether to log raw HTTP responsesmaxRetries- the maximum number of retries for API requests. It uses the default value of 3 if not specified
-
-
Method Details
-
withApiKey
Creates a new instance of MistralAiModels with the specified API key.- Parameters:
apiKey- the API key for authentication- Returns:
- a new instance of MistralAiModels
-
availableModels
Retrieves the list of all available models.- Returns:
- the response containing the list of models
-
builder
-