4 Commits

Author SHA1 Message Date
renovate[bot]
8c100d7e65 chore(deps): update codecov/codecov-action action to v5 2025-04-14 12:49:03 +00:00
Ivan Gabriele
9ad6a1dc84 ci(release): v0.14.0 2024-08-27 09:28:58 +02:00
Ivan Gabriele
7c464830ee docs(changelog): update 2024-08-27 09:28:50 +02:00
francois-caddet
161b33c725 feat(constants): update model constants (#17)
* feat(Model)!: Update model constants

- Add new models Mistral Nemo and Codestral Mamba
- Add aliases to models constant to be deserialized seemlessly from the versioned forme (e.g.: "mistral-large-2407")
- The commonly named Mistral Large 2 is now `constants::Model::MistralLargeLatest` when the old one is `Model::MistralLarge`

* tests(Model): Update the tests to check the new model variants.
2024-08-27 09:25:59 +02:00
5 changed files with 20 additions and 6 deletions

View File

@@ -22,7 +22,7 @@ jobs:
env: env:
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }} MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
- name: Upload tests coverage - name: Upload tests coverage
uses: codecov/codecov-action@v4 uses: codecov/codecov-action@v5
with: with:
fail_ci_if_error: true fail_ci_if_error: true
files: ./lcov.info files: ./lcov.info

View File

@@ -1,3 +1,8 @@
## [0.14.0](https://github.com/ivangabriele/mistralai-client-rs/compare/v0.13.0...v) (2024-08-27)
### Features
* **constants:** update model constants ([#17](https://github.com/ivangabriele/mistralai-client-rs/issues/17)) ([161b33c](https://github.com/ivangabriele/mistralai-client-rs/commit/161b33c72539a6e982207349942a436df95399b7))
## [0.13.0](https://github.com/ivangabriele/mistralai-client-rs/compare/v0.12.0...v) (2024-08-21) ## [0.13.0](https://github.com/ivangabriele/mistralai-client-rs/compare/v0.12.0...v) (2024-08-21)
### ⚠ BREAKING CHANGES ### ⚠ BREAKING CHANGES

View File

@@ -2,7 +2,7 @@
name = "mistralai-client" name = "mistralai-client"
description = "Mistral AI API client library for Rust (unofficial)." description = "Mistral AI API client library for Rust (unofficial)."
license = "Apache-2.0" license = "Apache-2.0"
version = "0.13.0" version = "0.14.0"
edition = "2021" edition = "2021"
rust-version = "1.76.0" rust-version = "1.76.0"

View File

@@ -10,16 +10,22 @@ pub enum Model {
OpenMixtral8x7b, OpenMixtral8x7b,
#[serde(rename = "open-mixtral-8x22b")] #[serde(rename = "open-mixtral-8x22b")]
OpenMixtral8x22b, OpenMixtral8x22b,
#[serde(rename = "open-mistral-nemo", alias = "open-mistral-nemo-2407")]
OpenMistralNemo,
#[serde(rename = "mistral-tiny")] #[serde(rename = "mistral-tiny")]
MistralTiny, MistralTiny,
#[serde(rename = "mistral-small-latest")] #[serde(rename = "mistral-small-latest", alias = "mistral-small-2402")]
MistralSmallLatest, MistralSmallLatest,
#[serde(rename = "mistral-medium-latest")] #[serde(rename = "mistral-medium-latest", alias = "mistral-medium-2312")]
MistralMediumLatest, MistralMediumLatest,
#[serde(rename = "mistral-large-latest")] #[serde(rename = "mistral-large-latest", alias = "mistral-large-2407")]
MistralLargeLatest, MistralLargeLatest,
#[serde(rename = "codestral-latest")] #[serde(rename = "mistral-large-2402")]
MistralLarge,
#[serde(rename = "codestral-latest", alias = "codestral-2405")]
CodestralLatest, CodestralLatest,
#[serde(rename = "open-codestral-mamba")]
CodestralMamba,
} }
#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]

View File

@@ -11,11 +11,14 @@ fn test_model_constant() {
Model::OpenMistral7b, Model::OpenMistral7b,
Model::OpenMixtral8x7b, Model::OpenMixtral8x7b,
Model::OpenMixtral8x22b, Model::OpenMixtral8x22b,
Model::OpenMistralNemo,
Model::MistralTiny, Model::MistralTiny,
Model::MistralSmallLatest, Model::MistralSmallLatest,
Model::MistralMediumLatest, Model::MistralMediumLatest,
Model::MistralLargeLatest, Model::MistralLargeLatest,
Model::MistralLarge,
Model::CodestralLatest, Model::CodestralLatest,
Model::CodestralMamba,
]; ];
let client = Client::new(None, None, None, None).unwrap(); let client = Client::new(None, None, None, None).unwrap();