Class MistralAiApi

java.lang.Object
org.springframework.ai.mistralai.api.MistralAiApi

public class MistralAiApi extends Object
Single-class, Java Client library for Mistral AI platform. Provides implementation for the Embeddings and the Chat Completion APIs.

Implements Synchronous and Streaming chat completion and supports latest Function Calling features.

Since:
1.0.0
Author:
Ricken Bazolo, Christian Tzolov, Thomas Vitale, Jason Smith
  • Field Details

    • PROVIDER_NAME

      public static final String PROVIDER_NAME
  • Constructor Details

    • MistralAiApi

      @Deprecated public MistralAiApi(String apiKey)
      Deprecated.
      Create a new client api with DEFAULT_BASE_URL
      Parameters:
      apiKey - Mistral api Key.
    • MistralAiApi

      @Deprecated public MistralAiApi(String baseUrl, String apiKey)
      Deprecated.
      Create a new client api.
      Parameters:
      baseUrl - api base URL.
      apiKey - Mistral api Key.
    • MistralAiApi

      @Deprecated public MistralAiApi(String baseUrl, String apiKey, org.springframework.web.client.RestClient.Builder restClientBuilder, org.springframework.web.client.ResponseErrorHandler responseErrorHandler)
      Deprecated.
      Create a new client api.
      Parameters:
      baseUrl - api base URL.
      apiKey - Mistral api Key.
      restClientBuilder - RestClient builder.
      responseErrorHandler - Response error handler.
    • MistralAiApi

      public MistralAiApi(String baseUrl, String apiKey, org.springframework.web.client.RestClient.Builder restClientBuilder, org.springframework.web.reactive.function.client.WebClient.Builder webClientBuilder, org.springframework.web.client.ResponseErrorHandler responseErrorHandler)
      Create a new client api.
      Parameters:
      baseUrl - api base URL.
      apiKey - Mistral api Key.
      restClientBuilder - RestClient builder.
      responseErrorHandler - Response error handler.
  • Method Details