Compare commits
1 Commits
v0.6.0
...
33c6f2c4e3
| Author | SHA1 | Date | |
|---|---|---|---|
|
33c6f2c4e3
|
@@ -18,7 +18,7 @@ pub struct AzureOpenAIConfig {
|
||||
impl AzureOpenAIClient {
|
||||
config_get_fn!(api_base, get_api_base);
|
||||
config_get_fn!(api_key, get_api_key);
|
||||
|
||||
|
||||
create_client_config!([
|
||||
(
|
||||
"api_base",
|
||||
|
||||
@@ -119,7 +119,11 @@ fn prepare_chat_completions(
|
||||
format!("{base_url}/google/models/{model_name}:{func}")
|
||||
}
|
||||
ModelCategory::Claude => {
|
||||
format!("{base_url}/anthropic/models/{model_name}:streamRawPredict")
|
||||
let func = match data.stream {
|
||||
true => "streamRawPredict",
|
||||
false => "rawPredict",
|
||||
};
|
||||
format!("{base_url}/anthropic/models/{model_name}:{func}")
|
||||
}
|
||||
ModelCategory::Mistral => {
|
||||
let func = match data.stream {
|
||||
|
||||
+3
-3
@@ -16,8 +16,8 @@ use parking_lot::RwLock;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::json;
|
||||
use std::{
|
||||
collections::HashMap, env, fmt, fmt::Debug, fs, hash::Hash, path::Path, sync::Arc,
|
||||
time::Duration,
|
||||
cmp::Ordering, collections::HashMap, env, fmt, fmt::Debug, fs, hash::Hash, path::Path,
|
||||
sync::Arc, time::Duration,
|
||||
};
|
||||
use tokio::time::sleep;
|
||||
|
||||
@@ -1196,7 +1196,7 @@ fn reciprocal_rank_fusion(
|
||||
}
|
||||
}
|
||||
let mut sorted_items: Vec<(DocumentId, f32)> = map.into_iter().collect();
|
||||
sorted_items.sort_by(|a, b| b.1.partial_cmp(&a.1).unwrap());
|
||||
sorted_items.sort_by(|a, b| b.1.partial_cmp(&a.1).unwrap_or(Ordering::Equal));
|
||||
|
||||
sorted_items
|
||||
.into_iter()
|
||||
|
||||
Reference in New Issue
Block a user