Datasette-embeddings

Latest version: v0.1a3

Safety actively analyzes 622867 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.1a3

This alpha changes the way embedding vectors are stored. Previously they were stored on the table itself, as columns with names like `emb_text_embedding_3_large_256`. [3](https://github.com/datasette/datasette-embeddings/issues/3)

They are now instead stored in a separate table, with the name `_embeddings_TABLE` where `TABLE` is the name of the original table.

If you have previously calculated embedding vectors stored in columns on an existing table, you can migrate them to the new table structure by following these steps: [11](https://github.com/datasette/datasette-embeddings/issues/11)

1. Create a new shadow table to store your embeddings. This table should have the name `_embeddings_TABLE` where `TABLE` is the name of your source table, and the same primary key (or compound primary keys). It should then have a `emb_xxx` column for each stored embedding vector.

One way to create this table is to select a single row and embed just that - this will create the table for you while only costing you one embedding run.
2. Run the following SQL query to copy across your vectors:

sql
insert or replace into _embeddings_TABLE (id, emb_xxx)
select id, emb_xxx from TABLE where emb_xxx is not null

3. Drop the old column: `alter table TABLE drop column emb_xxx`

0.1a2

- Fixed a packaging bug with the semantic search template. Refs [2](https://github.com/datasette/datasette-embeddings/issues/2)

0.1a0

- Initial alpha release. Adds an enrichment for calculating and storing OpenAI embeddings for selected columns in a table. [1](https://github.com/datasette/datasette-embeddings/issues/1)

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.