File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 1
- use crate :: pinecone:: { PineconeClient , PINECONE_API_VERSION_KEY } ;
1
+ use crate :: pinecone:: PineconeClient ;
2
2
use crate :: protos:: vector_service_client:: VectorServiceClient ;
3
3
use crate :: utils:: errors:: { handle_response_error, PineconeError } ;
4
4
use once_cell:: sync:: Lazy ;
@@ -133,7 +133,7 @@ impl Index {
133
133
. collect :: < Vec < String > > ( )
134
134
. join ( "\n " ) ;
135
135
136
- req_builder = req_builder. json ( & ndjson) ;
136
+ req_builder = req_builder. body ( ndjson) ;
137
137
138
138
let req = req_builder
139
139
. build ( )
@@ -808,4 +808,14 @@ mod tests {
808
808
. await
809
809
. expect_err ( "Expected connection error" ) ;
810
810
}
811
+
812
+ #[ tokio:: test]
813
+ async fn test_serialize_json ( ) {
814
+ let json_val = serde_json:: json!( {
815
+ "_id" : "123" ,
816
+ "hello" : "world" }
817
+ ) ;
818
+ let json = r#"{"_id":"123","hello":"world"}"# ;
819
+ assert_eq ! ( json_val. to_string( ) , json) ;
820
+ }
811
821
}
You can’t perform that action at this time.
0 commit comments