Skip to content

Commit

Permalink
Improved formatting [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Oct 17, 2023
1 parent daf2ce9 commit 90c2681
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,11 @@ Get the nearest neighbors

```csharp
var embedding = new Vector(new float[] { 1, 1, 1 });
var items = await ctx.Items.OrderBy(x => x.Embedding!.L2Distance(embedding)).Take(5).ToListAsync();
var items = await ctx.Items
.OrderBy(x => x.Embedding!.L2Distance(embedding))
.Take(5)
.ToListAsync();

foreach (Item item in items)
{
if (item.Embedding != null)
Expand Down

0 comments on commit 90c2681

Please sign in to comment.