mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-06-14 20:11:38 +02:00
Use the same units
This commit is contained in:
parent
6433e49882
commit
416fcf47f1
@ -128,7 +128,8 @@ impl ChatCompletionSource {
|
||||
/// Old OpenAI models use the system role while new ones use the developer role.
|
||||
fn old_openai_model(model: &str) -> bool {
|
||||
["gpt-3.5", "gpt-4", "gpt-4.1", "gpt-4.5", "gpt-4o", "chatgpt-4o"].iter().any(|old| {
|
||||
model.starts_with(old) && model.chars().nth(old.len()).is_none_or(|last| last == '-')
|
||||
model.starts_with(old)
|
||||
&& model.chars().nth(old.chars().count()).is_none_or(|last| last == '-')
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user