@@ -50,7 +50,7 @@ private static V1.SearchRequest BaseSearchRequest(
5050 Vectors = { includeVectors ? . Vectors ?? [ ] } ,
5151 } ;
5252
53- var request = new Grpc . Protobuf . V1 . SearchRequest ( )
53+ var request = new V1 . SearchRequest ( )
5454 {
5555 Collection = collection ,
5656 Filters = filters ? . InternalFilter ,
@@ -143,14 +143,9 @@ groupedTask.Provider is null
143143 return request ;
144144 }
145145
146- private static Grpc . Protobuf . V1 . GenerativeProvider GetGenerativeProvider (
147- Models . GenerativeProvider provider
148- )
146+ private static V1 . GenerativeProvider GetGenerativeProvider ( Models . GenerativeProvider provider )
149147 {
150- var result = new Grpc . Protobuf . V1 . GenerativeProvider
151- {
152- ReturnMetadata = provider . ReturnMetadata ,
153- } ;
148+ var result = new V1 . GenerativeProvider { ReturnMetadata = provider . ReturnMetadata } ;
154149
155150 switch ( provider )
156151 {
@@ -379,14 +374,14 @@ Models.GenerativeProvider provider
379374 return result ;
380375 }
381376
382- private static Grpc . Protobuf . V1 . ConsistencyLevel MapConsistencyLevel ( ConsistencyLevels value )
377+ private static V1 . ConsistencyLevel MapConsistencyLevel ( ConsistencyLevels value )
383378 {
384379 return value switch
385380 {
386- ConsistencyLevels . Unspecified => Grpc . Protobuf . V1 . ConsistencyLevel . Unspecified ,
387- ConsistencyLevels . All => Grpc . Protobuf . V1 . ConsistencyLevel . All ,
388- ConsistencyLevels . One => Grpc . Protobuf . V1 . ConsistencyLevel . One ,
389- ConsistencyLevels . Quorum => Grpc . Protobuf . V1 . ConsistencyLevel . Quorum ,
381+ ConsistencyLevels . Unspecified => V1 . ConsistencyLevel . Unspecified ,
382+ ConsistencyLevels . All => V1 . ConsistencyLevel . All ,
383+ ConsistencyLevels . One => V1 . ConsistencyLevel . One ,
384+ ConsistencyLevels . Quorum => V1 . ConsistencyLevel . Quorum ,
390385 _ => throw new NotSupportedException ( $ "Consistency level { value } is not supported.") ,
391386 } ;
392387 }
@@ -413,12 +408,12 @@ private static (
413408 // This also covers the case where no target vector is specified and only one vector is provided
414409 // In this case, we assume the single provided vector is the target
415410 vectors = vector
416- . Select ( v => new Grpc . Protobuf . V1 . Vectors
411+ . Select ( v => new V1 . Vectors
417412 {
418413 Name = v . Key ,
419414 Type = v . Value . IsMultiVector
420- ? Grpc . Protobuf . V1 . Vectors . Types . VectorType . MultiFp32
421- : Grpc . Protobuf . V1 . Vectors . Types . VectorType . SingleFp32 ,
415+ ? V1 . Vectors . Types . VectorType . MultiFp32
416+ : V1 . Vectors . Types . VectorType . SingleFp32 ,
422417 VectorBytes = v . Value . ToByteString ( ) ,
423418 } )
424419 . ToList ( ) ;
@@ -444,17 +439,17 @@ private static (
444439 : vector . Values . ElementAt ( idx ) ,
445440 }
446441 )
447- . Select ( v => new Grpc . Protobuf . V1 . VectorForTarget ( )
442+ . Select ( v => new V1 . VectorForTarget ( )
448443 {
449444 Name = v . Name ,
450445 Vectors =
451446 {
452- new Grpc . Protobuf . V1 . Vectors
447+ new V1 . Vectors
453448 {
454449 Name = v . Name ,
455450 Type = v . Vector . IsMultiVector
456- ? Grpc . Protobuf . V1 . Vectors . Types . VectorType . MultiFp32
457- : Grpc . Protobuf . V1 . Vectors . Types . VectorType . SingleFp32 ,
451+ ? V1 . Vectors . Types . VectorType . MultiFp32
452+ : V1 . Vectors . Types . VectorType . SingleFp32 ,
458453 VectorBytes = v . Vector . ToByteString ( ) ,
459454 } ,
460455 } ,
@@ -464,12 +459,12 @@ private static (
464459 else
465460 {
466461 vectors = vector
467- . Select ( v => new Grpc . Protobuf . V1 . Vectors
462+ . Select ( v => new V1 . Vectors
468463 {
469464 Name = v . Key ,
470465 Type = v . Value . IsMultiVector
471- ? Grpc . Protobuf . V1 . Vectors . Types . VectorType . MultiFp32
472- : Grpc . Protobuf . V1 . Vectors . Types . VectorType . SingleFp32 ,
466+ ? V1 . Vectors . Types . VectorType . MultiFp32
467+ : V1 . Vectors . Types . VectorType . SingleFp32 ,
473468 VectorBytes = v . Value . ToByteString ( ) ,
474469 } )
475470 . ToList ( ) ;
@@ -478,7 +473,7 @@ private static (
478473 return ( targets , vectorForTarget , vectors ) ;
479474 }
480475
481- private static Grpc . Protobuf . V1 . NearTextSearch BuildNearText (
476+ private static V1 . NearTextSearch BuildNearText (
482477 string [ ] query ,
483478 double ? distance ,
484479 double ? certainty ,
@@ -488,13 +483,13 @@ private static Grpc.Protobuf.V1.NearTextSearch BuildNearText(
488483 )
489484 {
490485 var ( targets , _, _) = BuildTargetVector ( targetVector , null ) ;
491- var nearText = new Grpc . Protobuf . V1 . NearTextSearch { Query = { query } , Targets = targets } ;
486+ var nearText = new V1 . NearTextSearch { Query = { query } , Targets = targets } ;
492487
493488 if ( moveTo is not null )
494489 {
495490 var uuids = moveTo . Objects is null ? [ ] : moveTo . Objects . Select ( x => x . ToString ( ) ) ;
496491 var concepts = moveTo . Concepts is null ? new string [ ] { } : moveTo . Concepts ;
497- nearText . MoveTo = new Grpc . Protobuf . V1 . NearTextSearch . Types . Move
492+ nearText . MoveTo = new V1 . NearTextSearch . Types . Move
498493 {
499494 Uuids = { uuids } ,
500495 Concepts = { concepts } ,
@@ -506,7 +501,7 @@ private static Grpc.Protobuf.V1.NearTextSearch BuildNearText(
506501 {
507502 var uuids = moveAway . Objects is null ? [ ] : moveAway . Objects . Select ( x => x . ToString ( ) ) ;
508503 var concepts = moveAway . Concepts is null ? new string [ ] { } : moveAway . Concepts ;
509- nearText . MoveAway = new Grpc . Protobuf . V1 . NearTextSearch . Types . Move
504+ nearText . MoveAway = new V1 . NearTextSearch . Types . Move
510505 {
511506 Uuids = { uuids } ,
512507 Concepts = { concepts } ,
@@ -527,14 +522,14 @@ private static Grpc.Protobuf.V1.NearTextSearch BuildNearText(
527522 return nearText ;
528523 }
529524
530- private static Grpc . Protobuf . V1 . NearVector BuildNearVector (
525+ private static V1 . NearVector BuildNearVector (
531526 Models . Vectors vector ,
532527 double ? certainty ,
533528 double ? distance ,
534529 TargetVectors ? targetVector
535530 )
536531 {
537- Grpc . Protobuf . V1 . NearVector nearVector = new ( ) ;
532+ V1 . NearVector nearVector = new ( ) ;
538533
539534 if ( distance . HasValue )
540535 {
@@ -565,7 +560,7 @@ private static Grpc.Protobuf.V1.NearVector BuildNearVector(
565560 }
566561
567562 private static void BuildBM25 (
568- SearchRequest request ,
563+ V1 . SearchRequest request ,
569564 string query ,
570565 string [ ] ? properties = null ,
571566 BM25Operator ? searchOperator = null
@@ -593,7 +588,7 @@ private static void BuildBM25(
593588 }
594589
595590 private static void BuildHybrid (
596- Grpc . Protobuf . V1 . SearchRequest request ,
591+ V1 . SearchRequest request ,
597592 string ? query = null ,
598593 float ? alpha = null ,
599594 Models . Vectors ? vector = null ,
0 commit comments