docs: Fix snippets (#868)

This commit is contained in:
Anush
2024-05-07 05:56:44 +05:30
committed by GitHub
parent 5b859f95a6
commit 8853f84a95
4 changed files with 121 additions and 31 deletions
@@ -139,6 +139,22 @@ client
.get();
```
```csharp
using Qdrant.Client;
using Qdrant.Client.Grpc;
using static Qdrant.Client.Grpc.Conditions;
var client = new QdrantClient("localhost", 6334);
await client.RecommendAsync(
"{collection_name}",
positive: new ulong[] { 100, 231 },
negative: new ulong[] { 718 },
filter: MatchKeyword("city", "London"),
limit: 3
);
```
Example result of this API would be
```json
@@ -1012,6 +1028,31 @@ client
.get();
```
```csharp
using Qdrant.Client;
using Qdrant.Client.Grpc;
var client = new QdrantClient("localhost", 6334);
await client.DiscoverAsync(
collectionName: "{collection_name}",
context:
[
new()
{
Positive = new VectorExample { Id = 100 },
Negative = new VectorExample { Id = 718 }
},
new()
{
Positive = new VectorExample { Id = 200 },
Negative = new VectorExample { Id = 300 }
}
],
limit: 10
);
```
<aside role="status">
Notes about context search: