From 19b556e69fd861c60782f0e1d7b405706a3b34e0 Mon Sep 17 00:00:00 2001 From: Anush008 Date: Wed, 15 Jan 2025 11:47:22 +0530 Subject: [PATCH] v1.13.0 Signed-off-by: Anush008 --- Directory.Build.props | 2 +- src/Qdrant.Client/Grpc/Conditions.cs | 13 ++++++++++++ src/Qdrant.Client/Grpc/VectorInput.cs | 30 +++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 3075d79..93b1a76 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -9,7 +9,7 @@ https://github.com/qdrant/qdrant-dotnet https://github.com/qdrant/qdrant-dotnet/releases qdrant, database, vector, search - v1.12.0 + dev diff --git a/src/Qdrant.Client/Grpc/Conditions.cs b/src/Qdrant.Client/Grpc/Conditions.cs index 3bce8b0..3f96208 100644 --- a/src/Qdrant.Client/Grpc/Conditions.cs +++ b/src/Qdrant.Client/Grpc/Conditions.cs @@ -284,6 +284,19 @@ public static Condition DatetimeRange(string field, DateTime? lt = null, DateTim return new Condition { Field = new FieldCondition { Key = field, DatetimeRange = datetimeRange } }; } + /// + /// Match all records which contain the specified vector. + /// + /// The ids to match + /// a new instance of + public static Condition HasVector(string vector) => new Condition + { + HasVector = new HasVectorCondition + { + HasVector = vector + } + }; + } diff --git a/src/Qdrant.Client/Grpc/VectorInput.cs b/src/Qdrant.Client/Grpc/VectorInput.cs index cfd17c1..2e24b3e 100644 --- a/src/Qdrant.Client/Grpc/VectorInput.cs +++ b/src/Qdrant.Client/Grpc/VectorInput.cs @@ -84,4 +84,34 @@ public static implicit operator VectorInput(float[][] values) { Id = id }; + + /// + /// Implicitly converts a to a new instance of + /// + /// an instance of + /// a new instance of + public static implicit operator VectorInput(Document document) => new() + { + Document = document + }; + + /// + /// Implicitly converts an to a new instance of + /// + /// an instance of + /// a new instance of + public static implicit operator VectorInput(Image image) => new() + { + Image = image + }; + + /// + /// Implicitly converts an to a new instance of + /// + /// an instance of + /// a new instance of + public static implicit operator VectorInput(InferenceObject obj) => new() + { + Object = obj + }; }