Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023-2024 the original author or authors.
* Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -48,9 +48,10 @@

/**
* Single-class, Java Client library for Mistral AI platform. Provides implementation for
* the <a href="https://docs.mistral.ai/api/#operation/createEmbedding">MistralAI
* Embedding API</a> and the
* <a href="https://docs.mistral.ai/api/#operation/createChatCompletion">Chat
* the <a href=
* "https://docs.mistral.ai/api/#tag/embeddings/operation/embeddings_v1_embeddings_post">Embeddings</a>
* and the <a href=
* "https://docs.mistral.ai/api/#tag/chat/operation/chat_completion_v1_chat_completions_post">Chat
* Completion</a> APIs.
* <p>
* Implements <b>Synchronous</b> and <b>Streaming</b> chat completion and supports latest
Expand Down Expand Up @@ -269,12 +270,10 @@ public enum ChatCompletionFinishReason {

/**
* List of well-known Mistral chat models.
* https://docs.mistral.ai/platform/endpoints/#mistral-ai-generative-models
*
* <p>
* Mistral AI provides two types of models: open-weights models (Mistral 7B, Mixtral
* 8x7B, Mixtral 8x22B) and optimized commercial models (Mistral Small, Mistral
* Medium, Mistral Large, and Mistral Embeddings).
* @see <a href=
* "https://docs.mistral.ai/getting-started/models/models_overview/">Mistral AI Models
* Overview</a>
*/
public enum ChatModel implements ChatModelDescription {

Expand Down Expand Up @@ -315,7 +314,10 @@ public String getName() {

/**
* List of well-known Mistral embedding models.
* https://docs.mistral.ai/platform/endpoints/#mistral-ai-embedding-model
*
* @see <a href=
* "https://docs.mistral.ai/getting-started/models/models_overview/">Mistral AI Models
* Overview</a>
*/
public enum EmbeddingModel {

Expand Down Expand Up @@ -828,9 +830,10 @@ public String content() {

/**
* The role of the author of this message.
*
* <p>
* NOTE: Mistral expects the system message to be before the user message or will
* fail with 400 error.
* </p>
*/
public enum Role {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
import org.springframework.web.client.RestClient;

/**
* MistralAI Moderation API.
* Mistral AI Moderation API.
*
* @see <a href= "https://docs.mistral.ai/capabilities/guardrailing/">Moderation</a>
* @author Ricken Bazolo
* @see <a href= "https://docs.mistral.ai/capabilities/guardrailing/</a>
*/
public class MistralAiModerationApi {

Expand Down Expand Up @@ -71,6 +71,13 @@ public ResponseEntity<MistralAiModerationResponse> moderate(MistralAiModerationR
.toEntity(MistralAiModerationResponse.class);
}

/**
* List of well-known Mistral moderation models.
*
* @see <a href=
* "https://docs.mistral.ai/getting-started/models/models_overview/">Mistral AI Models
* Overview</a>
*/
public enum Model {

// @formatter:off
Expand Down