Skip to content

Commit 5dbfbf9

Browse files
committed
feat: Add Pixtral and new Llama 3.2 Vision models to MistralAi and Ollama integrations
- Add Pixtral models (PIXTRAL and PIXTRAL_LARGE) to MistralAiApi.ChatModel - Update MistralAiChatClientIT to use Pixtral model for testing - Add new Ollama models: * QWEN_2_5_7B * LLAMA3_2_VISION_11b * LLAMA3_2_VISION_90b
1 parent d759fb2 commit 5dbfbf9

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,9 @@ public enum ChatModel implements ChatModelDescription {
270270
SMALL("mistral-small-latest"),
271271
@Deprecated(since = "1.0.0-M1", forRemoval = true) // Mistral will be removing this model - see https://docs.mistral.ai/getting-started/models/models_overview/
272272
MEDIUM("mistral-medium-latest"),
273-
LARGE("mistral-large-latest");
273+
LARGE("mistral-large-latest"),
274+
PIXTRAL("pixtral-12b-2409"),
275+
PIXTRAL_LARGE("pixtral-large-latest");
274276
// @formatter:on
275277

276278
private final String value;

models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiChatClientIT.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,9 @@ void streamFunctionCallTest() {
290290

291291
@Test
292292
void validateCallResponseMetadata() {
293-
String model = MistralAiApi.ChatModel.OPEN_MISTRAL_7B.getName();
293+
// String model = MistralAiApi.ChatModel.OPEN_MISTRAL_7B.getName();
294+
String model = MistralAiApi.ChatModel.PIXTRAL.getName();
295+
// String model = MistralAiApi.ChatModel.PIXTRAL_LARGE.getName();
294296
// @formatter:off
295297
ChatResponse response = ChatClient.create(this.chatModel).prompt()
296298
.options(MistralAiChatOptions.builder().withModel(model).build())

models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/OllamaModel.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
*/
2828
public enum OllamaModel implements ChatModelDescription {
2929

30+
/**
31+
* Qwen 2.5
32+
*/
33+
QWEN_2_5_7B("qwen2.5"),
34+
3035
/**
3136
* Llama 2 is a collection of language models ranging from 7B to 70B parameters.
3237
*/
@@ -47,6 +52,16 @@ public enum OllamaModel implements ChatModelDescription {
4752
*/
4853
LLAMA3_2("llama3.2"),
4954

55+
/**
56+
* The Llama 3.2 Vision 11B language model from Meta.
57+
*/
58+
LLAMA3_2_VISION_11b("llama3.2-vision"),
59+
60+
/**
61+
* The Llama 3.2 Vision 90B language model from Meta.
62+
*/
63+
LLAMA3_2_VISION_90b("llama3.2-vision:90b"),
64+
5065
/**
5166
* The Llama 3.2 1B language model from Meta.
5267
*/

0 commit comments

Comments
 (0)