Class MistralAiModels

java.lang.Object
dev.langchain4j.model.mistralai.MistralAiModels

public class MistralAiModels extends Object
Represents a collection of Mistral AI models. You can find description of parameters here.
  • 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 specified
      apiKey - the API key for authentication
      timeout - the timeout duration for API requests. It uses the default value of 60 seconds if not specified
      logRequests - a flag whether to log raw HTTP requests
      logResponses - a flag whether to log raw HTTP responses
      maxRetries - the maximum number of retries for API requests. It uses the default value of 3 if not specified
  • Method Details

    • withApiKey

      public static MistralAiModels withApiKey(String apiKey)
      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

      public Response<List<MistralAiModelCard>> availableModels()
      Retrieves the list of all available models.
      Returns:
      the response containing the list of models
    • builder

      public static MistralAiModels.MistralAiModelsBuilder builder()