docs: C# snippets

Signed-off-by: Anush008 <anushshetty90@gmail.com>
This commit is contained in:
Anush008
2025-11-14 17:42:18 +05:30
parent 651b209c20
commit 71ec1b2841
46 changed files with 257 additions and 37 deletions
@@ -0,0 +1,21 @@
```csharp
using Qdrant.Client;
using Qdrant.Client.Grpc;
var client = new QdrantClient(
host: "xyz-example.qdrant.io",
port: 6334,
https: true,
apiKey: "<your-api-key>"
);
await client.QueryAsync(
collectionName: "{collection_name}",
query: new Document()
{
Model = "cohere/embed-v4.0",
Text = "a green square",
Options = { ["cohere-api-key"] = "<YOUR_COHERE_API_KEY>", ["output_dimension"] = 512 },
}
);
```
@@ -14,7 +14,7 @@ client, err := qdrant.NewClient(&qdrant.Config{
})
client.Query(ctx, &qdrant.QueryPoints{
CollectionName: "<your-collection>",
CollectionName: "{collection_name}",
Query: qdrant.NewQueryNearest(
qdrant.NewVectorInputDocument(&qdrant.Document{
Text: "a green square",
@@ -1,5 +1,5 @@
```http
POST /collections/<your-collection_name>/points/query
POST /collections/{collection_name}/points/query
{
"query": {
"text": "a green square",
@@ -8,7 +8,7 @@ client = QdrantClient(
)
client.query_points(
collection_name="<your_collection_name>",
collection_name="{collection_name}",
query=models.Document(
text="a green square",
model="cohere/embed-v4.0",
@@ -13,7 +13,7 @@ options.insert("output_dimension".to_string(), 512.into());
client
.query(
QueryPointsBuilder::new("<your-collection_name>")
QueryPointsBuilder::new("{collection_name}")
.query(Query::new_nearest(Document {
text: "a green square".into(),
model: "cohere/embed-v4.0".into(),