janpaul123
semanticSearchTurso
Script
Part of Val Town Semantic Search . Uses Turso to search embeddings of all vals, using the sqlite-vss extension. Call OpenAI to generate an embedding for the search query. Query the vss_vals_embeddings table in Turso using vss_search . The vss_vals_embeddings table has been generated by janpaul123/indexValsTurso . It is not run automatically. This table is incomplete due to a bug in Turso .
0
g
vtdb
Script
Val Town Database This val exports vtdb , a correctly typed Kysely instance
to query the @sqlite.db database containing public vals. Example usage: import { vtdb } from 'https://esm.town/v/g/vtdb';
const vals = await vtdb.selectFrom('vals')
.selectAll()
.orderBy('created_at desc')
.limit(5)
.execute();
console.log(vals.map((val) => val.name));
4
sqlite-db.web.val.run
Updated: March 11, 2024