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,29 @@
```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.UpsertAsync(
collectionName: "{collection_name}",
points: new List<PointStruct>
{
new()
{
Id = 1,
Vectors = new Image()
{
Model = "cohere/embed-v4.0",
Image_ =
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mNk+M9Qz0AEYBxVSF+FAAhKDveksOjmAAAAAElFTkSuQmCC",
Options =
{
["cohere-api-key"] = "<YOUR_COHERE_API_KEY>",
["output_dimension"] = 512,
},
},
},
}
);
```
@@ -14,7 +14,7 @@ client, err := qdrant.NewClient(&qdrant.Config{
})
client.Upsert(ctx, &qdrant.UpsertPoints{
CollectionName: "<your-collection>",
CollectionName: "{collection_name}",
Points: []*qdrant.PointStruct{
{
Id: qdrant.NewIDNum(uint64(1)),
@@ -1,5 +1,5 @@
```http
PUT /collections/<your-collection_name>/points?wait=true
PUT /collections/{collection_name}/points?wait=true
{
"points": [
{
@@ -8,7 +8,7 @@ client = QdrantClient(
)
client.upsert(
collection_name="<your_collection_name>",
collection_name="{collection_name}",
points=[
models.PointStruct(
id=1,
@@ -11,7 +11,7 @@ options.insert("cohere-api-key".to_string(), "<YOUR_COHERE_API_KEY>".into());
options.insert("output_dimension".to_string(), 512.into());
client
.upsert_points(UpsertPointsBuilder::new("<your-collection>",
.upsert_points(UpsertPointsBuilder::new("{collection_name}",
vec![
PointStruct::new(1,
Document {