Add support for changing the Codestral endpoint (#41116)
```json
"edit_predictions": {
"codestral": {
"api_url": "https://codestral.mistral.ai",
"model": "codestral-latest",
"max_tokens": 150
}
},
```
Release Notes:
- Added support for changing the Codestral endpoint. This was discussed
at #34371.
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
This commit is contained in:
co-authored by
Bennet Bo Fenner
parent
821a4880bd
commit
a70f80df95
@@ -420,6 +420,8 @@ pub struct CodestralSettings {
|
||||
pub model: Option<String>,
|
||||
/// Maximum tokens to generate.
|
||||
pub max_tokens: Option<u32>,
|
||||
/// Custom API URL to use for Codestral.
|
||||
pub api_url: Option<String>,
|
||||
}
|
||||
|
||||
impl AllLanguageSettings {
|
||||
@@ -636,6 +638,7 @@ impl settings::Settings for AllLanguageSettings {
|
||||
let codestral_settings = CodestralSettings {
|
||||
model: codestral.model,
|
||||
max_tokens: codestral.max_tokens,
|
||||
api_url: codestral.api_url,
|
||||
};
|
||||
|
||||
let enabled_in_text_threads = edit_predictions.enabled_in_text_threads.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user