Skip to content

Commit

Permalink
Some small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nairihar committed Mar 21, 2024
1 parent 073fbbd commit 2fd4111
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/typeorm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,10 @@ await bookRepository
.getMany();
```

Corresponding SQL code:
Corresponding SQL code (example):

```sql
SELECT * FROM "books"
WHERE "url" IS NOT NULL
ORDER BY "embedding" <-> image_embedding('clip/ViT-B-32-visual', "...") DESC
LIMIT 2;
```
4 changes: 2 additions & 2 deletions types/drizzle-orm/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export function createLanternExtrasExtension(): SQLWrapper;
export function generateTextEmbedding(modelKey: TextEmbeddingModelType, value: string): PgColumn;
export function generateImageEmbedding(modelKey: ImageEmbeddingModelType, value: string): PgColumn;

export function textEmbedding(modelKey: TextEmbeddingModelType, column: string): string;
export function imageEmbedding(modelKey: ImageEmbeddingModelType, column: string): string;
export function textEmbedding(modelKey: TextEmbeddingModelType, column: string): PgColumn;
export function imageEmbedding(modelKey: ImageEmbeddingModelType, column: string): PgColumn;

export function l2Distance(column: Column, value: number[] | string): PgColumn;
export function cosineDistance(column: Column, value: number[] | string): PgColumn;
Expand Down

0 comments on commit 2fd4111

Please sign in to comment.