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, Nicolas Krier, Sebastien Deleuze
  • Field Details

    • PROVIDER_NAME

      public static final String PROVIDER_NAME
  • Constructor Details

    • 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.
      webClientBuilder - WebClient builder.
      responseErrorHandler - Response error handler.
  • Method Details