Skip to content

Commit

Permalink
v1.13.0
Browse files Browse the repository at this point in the history
Signed-off-by: Anush008 <[email protected]>
  • Loading branch information
Anush008 committed Jan 15, 2025
1 parent 0846503 commit 19b556e
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PackageProjectUrl>https://github.com/qdrant/qdrant-dotnet</PackageProjectUrl>
<PackageReleaseNotes>https://github.com/qdrant/qdrant-dotnet/releases</PackageReleaseNotes>
<PackageTags>qdrant, database, vector, search</PackageTags>
<QdrantVersion>v1.12.0</QdrantVersion>
<QdrantVersion>dev</QdrantVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
13 changes: 13 additions & 0 deletions src/Qdrant.Client/Grpc/Conditions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,19 @@ public static Condition DatetimeRange(string field, DateTime? lt = null, DateTim
return new Condition { Field = new FieldCondition { Key = field, DatetimeRange = datetimeRange } };
}

/// <summary>
/// Match all records which contain the specified vector.
/// </summary>
/// <param name="vector">The ids to match</param>
/// <returns>a new instance of <see cref="Condition"/></returns>
public static Condition HasVector(string vector) => new Condition
{
HasVector = new HasVectorCondition
{
HasVector = vector
}
};

}


30 changes: 30 additions & 0 deletions src/Qdrant.Client/Grpc/VectorInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,34 @@ public static implicit operator VectorInput(float[][] values)
{
Id = id
};

/// <summary>
/// Implicitly converts a <see cref="Document"/> to a new instance of <see cref="VectorInput"/>
/// </summary>
/// <param name="document">an instance of <see cref="Document"/></param>
/// <returns>a new instance of <see cref="VectorInput"/></returns>
public static implicit operator VectorInput(Document document) => new()
{
Document = document
};

/// <summary>
/// Implicitly converts an <see cref="Image"/> to a new instance of <see cref="VectorInput"/>
/// </summary>
/// <param name="image">an instance of <see cref="Image"/></param>
/// <returns>a new instance of <see cref="VectorInput"/></returns>
public static implicit operator VectorInput(Image image) => new()
{
Image = image
};

/// <summary>
/// Implicitly converts an <see cref="InferenceObject"/> to a new instance of <see cref="VectorInput"/>
/// </summary>
/// <param name="obj">an instance of <see cref="InferenceObject"/></param>
/// <returns>a new instance of <see cref="VectorInput"/></returns>
public static implicit operator VectorInput(InferenceObject obj) => new()
{
Object = obj
};
}

0 comments on commit 19b556e

Please sign in to comment.