Skip to content

Commit 22755ef

Browse files
authored
Add trailing commas (#22)
1 parent ebe971c commit 22755ef

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ var index = await pinecone.CreateIndexAsync(new CreateIndexRequest
7575
Serverless = new ServerlessSpec
7676
{
7777
Cloud = ServerlessSpecCloud.Aws,
78-
Region = "us-east-1"
78+
Region = "us-east-1",
7979
}
8080
},
8181
DeletionProtection = DeletionProtection.Enabled
@@ -104,7 +104,7 @@ var index = await pinecone.CreateIndexAsync(new CreateIndexRequest
104104
PodType = "p1.x1",
105105
Pods = 1,
106106
Replicas = 1,
107-
Shards = 1
107+
Shards = 1,
108108
}
109109
},
110110
DeletionProtection = DeletionProtection.Enabled
@@ -163,7 +163,7 @@ var indexMetadata = await pinecone.ConfigureIndexAsync("example-index", new Conf
163163
Pod = new ConfigureIndexRequestSpecPod
164164
{
165165
Replicas = 2,
166-
PodType = "p1.x1"
166+
PodType = "p1.x1",
167167
}
168168
}
169169
});
@@ -206,31 +206,31 @@ float[][] values =
206206
[
207207
[1.0f, 2.0f, 3.0f],
208208
[4.0f, 5.0f, 6.0f],
209-
[7.0f, 8.0f, 9.0f]
209+
[7.0f, 8.0f, 9.0f],
210210
];
211211

212212
// List of sparse indices to be upserted
213213
uint[][] sparseIndices =
214214
[
215215
[1, 2, 3],
216216
[4, 5, 6],
217-
[7, 8, 9]
217+
[7, 8, 9],
218218
];
219219

220220
// List of sparse values to be upserted
221221
float[][] sparseValues =
222222
[
223223
[1000f, 2000f, 3000f],
224224
[4000f, 5000f, 6000f],
225-
[7000f, 8000f, 9000f]
225+
[7000f, 8000f, 9000f],
226226
];
227227

228228
// Metadata to be upserted
229229
var metadataStructArray = new[]
230230
{
231231
new Metadata { ["genre"] = "action", ["year"] = 2019 },
232232
new Metadata { ["genre"] = "thriller", ["year"] = 2020 },
233-
new Metadata { ["genre"] = "comedy", ["year"] = 2021 }
233+
new Metadata { ["genre"] = "comedy", ["year"] = 2021 },
234234
};
235235

236236
var vectors = new List<Vector>();
@@ -244,9 +244,9 @@ for (var i = 0; i <= 2; i++)
244244
SparseValues = new SparseValues
245245
{
246246
Indices = sparseIndices[i],
247-
Values = sparseValues[i]
247+
Values = sparseValues[i],
248248
},
249-
Metadata = metadataStructArray[i]
249+
Metadata = metadataStructArray[i],
250250
}
251251
);
252252
}
@@ -273,12 +273,12 @@ var queryResponse = await index.QueryAsync(
273273
TopK = 10,
274274
IncludeValues = true,
275275
IncludeMetadata = true,
276-
Filter = new Metadata
276+
Filter = new Metadata,
277277
{
278278
["genre"] =
279279
new Metadata
280280
{
281-
["$in"] = new[] { "comedy", "documentary", "drama" }
281+
["$in"] = new[] { "comedy", "documentary", "drama" },
282282
}
283283
}
284284
});
@@ -299,10 +299,10 @@ var queryResponse = await index.QueryAsync(
299299
{
300300
TopK = 10,
301301
Vector = [0.1f, 0.2f, 0.3f],
302-
SparseVector = new SparseValues
302+
SparseVector = new SparseValues,
303303
{
304304
Indices = [10, 45, 16],
305-
Values = [0.5f, 0.5f, 0.2f]
305+
Values = [0.5f, 0.5f, 0.2f],
306306
}
307307
}
308308
);
@@ -322,7 +322,7 @@ var index = pinecone.Index("example-index");
322322
var deleteResponse = await index.DeleteAsync(new DeleteRequest
323323
{
324324
Ids = new[] { "v1" },
325-
Namespace = "example-namespace"
325+
Namespace = "example-namespace",
326326
});
327327
```
328328

@@ -394,7 +394,7 @@ var updateResponse = await index.UpdateAsync(new UpdateRequest
394394
Id = "vec1",
395395
Values = new[] { 0.1f, 0.2f, 0.3f, 0.4f },
396396
SetMetadata = new Metadata { ["genre"] = "drama" },
397-
Namespace = "example-namespace"
397+
Namespace = "example-namespace",
398398
});
399399
```
400400

0 commit comments

Comments
 (0)