mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-24 00:52:24 +00:00
fix(python-bridge): restore Qdrant dispatch after rebase
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
ff2ca804b5
commit
6a06f69972
4 changed files with 19 additions and 13 deletions
|
|
@ -124,14 +124,17 @@ impl<E: Embedder, C: CacheCodec> QdrantSemanticCache<E, C> {
|
|||
}))
|
||||
.map_err(|_| Error::InvalidEntry)?;
|
||||
self.client
|
||||
.upsert_points(UpsertPointsBuilder::new(
|
||||
self.collection_name(),
|
||||
vec![PointStruct::new(
|
||||
Uuid::new_v4().to_string(),
|
||||
vector,
|
||||
payload,
|
||||
)],
|
||||
).wait(true))
|
||||
.upsert_points(
|
||||
UpsertPointsBuilder::new(
|
||||
self.collection_name(),
|
||||
vec![PointStruct::new(
|
||||
Uuid::new_v4().to_string(),
|
||||
vector,
|
||||
payload,
|
||||
)],
|
||||
)
|
||||
.wait(true),
|
||||
)
|
||||
.await
|
||||
.map_err(|_| Error::Unavailable)?;
|
||||
Ok(())
|
||||
|
|
|
|||
|
|
@ -384,7 +384,10 @@ async fn response_payloads_decode_and_invalid_entries_fail() {
|
|||
server.insert_point(StoredPoint {
|
||||
id: Some(PointId::from(key.len() as u64)),
|
||||
vector: vec![1.0, 0.0],
|
||||
payload: payload.into_iter().map(|(key, value)| (key, json_to_qdrant(value))).collect(),
|
||||
payload: payload
|
||||
.into_iter()
|
||||
.map(|(key, value)| (key, json_to_qdrant(value)))
|
||||
.collect(),
|
||||
});
|
||||
}
|
||||
assert_eq!(
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ use qdrant_client::qdrant::{
|
|||
CollectionOperationResponse, CreateCollection, CreateFieldIndexCollection, Filter, PointId,
|
||||
PointsOperationResponse, ScoredPoint, SearchPoints, SearchResponse, Value, Vector, Vectors,
|
||||
collections_server::Collections,
|
||||
value::Kind,
|
||||
points_server::{Points, PointsServer},
|
||||
value::Kind,
|
||||
};
|
||||
use serde_json::Value as JsonValue;
|
||||
use tokio::sync::oneshot;
|
||||
|
|
|
|||
|
|
@ -290,9 +290,9 @@ impl FacadeGuard {
|
|||
"redis_flush_size",
|
||||
][..],
|
||||
"qdrant_semantic" => &[
|
||||
"qdrant_api_base",
|
||||
"qdrant_api_key",
|
||||
"collection_name",
|
||||
"qdrant_api_base",
|
||||
"qdrant_api_key",
|
||||
"collection_name",
|
||||
"similarity_threshold",
|
||||
"embedding_model",
|
||||
"vector_size",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue