Skip to content

Commit f6cf0b2

Browse files
nicolaskrierchedim
authored andcommitted
Improve Mistral AI javadoc and update documentation links (spring-projects#4327)
Auto-cherry-pick to 1.0.x Fixes spring-projects#4327 Signed-off-by: Nicolas Krier <[email protected]>
1 parent d5d7f76 commit f6cf0b2

File tree

2 files changed

+23
-13
lines changed

2 files changed

+23
-13
lines changed

models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/api/MistralAiApi.java

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 the original author or authors.
2+
* Copyright 2023-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -48,9 +48,10 @@
4848

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

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

@@ -315,7 +314,10 @@ public String getName() {
315314

316315
/**
317316
* List of well-known Mistral embedding models.
318-
* https://docs.mistral.ai/platform/endpoints/#mistral-ai-embedding-model
317+
*
318+
* @see <a href=
319+
* "https://docs.mistral.ai/getting-started/models/models_overview/">Mistral AI Models
320+
* Overview</a>
319321
*/
320322
public enum EmbeddingModel {
321323

@@ -828,9 +830,10 @@ public String content() {
828830

829831
/**
830832
* The role of the author of this message.
831-
*
833+
* <p>
832834
* NOTE: Mistral expects the system message to be before the user message or will
833835
* fail with 400 error.
836+
* </p>
834837
*/
835838
public enum Role {
836839

models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/api/MistralAiModerationApi.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030
import org.springframework.web.client.RestClient;
3131

3232
/**
33-
* MistralAI Moderation API.
33+
* Mistral AI Moderation API.
3434
*
35+
* @see <a href= "https://docs.mistral.ai/capabilities/guardrailing/">Moderation</a>
3536
* @author Ricken Bazolo
36-
* @see <a href= "https://docs.mistral.ai/capabilities/guardrailing/</a>
3737
*/
3838
public class MistralAiModerationApi {
3939

@@ -71,6 +71,13 @@ public ResponseEntity<MistralAiModerationResponse> moderate(MistralAiModerationR
7171
.toEntity(MistralAiModerationResponse.class);
7272
}
7373

74+
/**
75+
* List of well-known Mistral moderation models.
76+
*
77+
* @see <a href=
78+
* "https://docs.mistral.ai/getting-started/models/models_overview/">Mistral AI Models
79+
* Overview</a>
80+
*/
7481
public enum Model {
7582

7683
// @formatter:off

0 commit comments

Comments
 (0)