You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(chat-completion): Update ChatCompletion to Mistral API version 0.0.2
BREAKING CHANGE: Large parts of ChatCompletionRequest were rewritten to support certain changes in the Mistral API. See MIGRATION.md for more information.
Copy file name to clipboardExpand all lines: .github/workflows/codeql.yml
+30-30Lines changed: 30 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -47,42 +47,42 @@ jobs:
47
47
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
48
48
49
49
steps:
50
-
- name: Checkout repository
51
-
uses: actions/checkout@v4
50
+
- name: Checkout repository
51
+
uses: actions/checkout@v4
52
52
53
-
- uses: actions/setup-java@v1
54
-
with:
55
-
java-version: 17
53
+
- uses: actions/setup-java@v1
54
+
with:
55
+
java-version: 17
56
56
57
-
# Initializes the CodeQL tools for scanning.
58
-
- name: Initialize CodeQL
59
-
uses: github/codeql-action/init@v3
60
-
with:
61
-
languages: ${{ matrix.language }}
62
-
# If you wish to specify custom queries, you can do so here or in a config file.
63
-
# By default, queries listed here will override any specified in a config file.
64
-
# Prefix the list here with "+" to use these queries and those in the config file.
57
+
# Initializes the CodeQL tools for scanning.
58
+
- name: Initialize CodeQL
59
+
uses: github/codeql-action/init@v3
60
+
with:
61
+
languages: ${{ matrix.language }}
62
+
# If you wish to specify custom queries, you can do so here or in a config file.
63
+
# By default, queries listed here will override any specified in a config file.
64
+
# Prefix the list here with "+" to use these queries and those in the config file.
65
65
66
-
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
67
-
queries: security-extended
66
+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
67
+
queries: security-extended
68
68
69
69
70
-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
71
-
# If this step fails, then you should remove it and run the build manually (see below)
72
-
- name: Autobuild
73
-
uses: github/codeql-action/autobuild@v3
70
+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
71
+
# If this step fails, then you should remove it and run the build manually (see below)
72
+
- name: Autobuild
73
+
uses: github/codeql-action/autobuild@v3
74
74
75
-
# ℹ️ Command-line programs to run using the OS shell.
76
-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
75
+
# ℹ️ Command-line programs to run using the OS shell.
76
+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
77
77
78
-
# If the Autobuild fails above, remove it and uncomment the following three lines.
79
-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
78
+
# If the Autobuild fails above, remove it and uncomment the following three lines.
79
+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
-**BREAKING**: Major refactor of message handling for chat completions:
4
+
- The `nl.dannyj.mistral.models.completion.Message` class has been removed.
5
+
- Introduced `nl.dannyj.mistral.models.completion.message.ChatMessage` as an abstract base class for messages.
6
+
- New concrete message classes: `SystemMessage`, `UserMessage`, `AssistantMessage`, `ToolMessage`.
7
+
- Message content is now represented by `List<nl.dannyj.mistral.models.completion.content.ContentChunk>` (e.g., `TextChunk`, `ImageURLChunk`) to support multi-modal inputs.
8
+
-`ChatCompletionRequest` now expects `List<ChatMessage>`.
9
+
- Streaming: `DeltaChoice` now contains a `nl.dannyj.mistral.models.completion.message.DeltaMessage` object which holds the actual delta (`role`, `content`, `toolCalls`).
10
+
-**BREAKING**: Changes to `nl.dannyj.mistral.models.completion.Choice`:
11
+
- The `finishReason` field type changed from `String` to `nl.dannyj.mistral.models.completion.FinishReason` (enum).
12
+
- The `logProbs` field has been removed.
13
+
-**BREAKING**: `encodingFormat` field removed from `EmbeddingRequest` as it is no longer supported by the API.
14
+
-**BREAKING**: The `nl.dannyj.mistral.models.model.ModelPermission` class has been removed.
15
+
-**BREAKING**: Package changes for core classes:
16
+
-`MessageChunk` moved to `nl.dannyj.mistral.models.completion.message.MessageChunk`.
17
+
-`MessageRole` moved to `nl.dannyj.mistral.models.completion.message.MessageRole`.
18
+
- Added support for function calling (tools).
19
+
- Added `nl.dannyj.mistral.models.model.ModelCapabilities` to provide model capability information (e.g., `supportsVision()`, `supportsFunctionCalling()`).
20
+
- Increased default read timeout to 120 seconds.
21
+
- Made it easier to configure timeouts ([issue #7](https://github.com/Dannyj1/mistral-java-client/issues/7))
3
22
- Update jackson-databind from 2.16.1 to 2.18.3
4
23
- Update jakarta.validation-api from 3.1.0-M1 to 3.1.1
0 commit comments