fix: update query text and similarity values in embeddings example
Deploy Function / deploy (push) Successful in 20s
Deploy Migrations to Production / deploy (push) Successful in 9s

This commit is contained in:
2026-02-17 11:28:29 -06:00
parent 63e0ea7fbf
commit fed348e214
+6 -6
View File
@@ -120,7 +120,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 13,
"id": "2d8fa9a9", "id": "2d8fa9a9",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
@@ -128,22 +128,22 @@
"name": "stdout", "name": "stdout",
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"🔎 Consulta: ¿Cómo se usan vectores?\n", "🔎 Consulta: ¿Cómo son buscados vectores?\n",
"\n", "\n",
"- Los vectores se usan con el cliente de OPENAI embeddings\n", "- Los vectores se usan con el cliente de OPENAI embeddings\n",
" Similaridad: 0.6407\n", " Similaridad: 0.5639\n",
"\n", "\n",
"- Supabase permite almacenar vectores usando pgvector.\n", "- Supabase permite almacenar vectores usando pgvector.\n",
" Similaridad: 0.5367\n", " Similaridad: 0.4758\n",
"\n", "\n",
"- Los embeddings convierten texto en representaciones numéricas.\n", "- Los embeddings convierten texto en representaciones numéricas.\n",
" Similaridad: 0.4706\n", " Similaridad: 0.3645\n",
"\n" "\n"
] ]
} }
], ],
"source": [ "source": [
"const consulta = \"¿Cómo se usan vectores?\";\n", "const consulta = \"¿Cómo son buscados vectores?\";\n",
"\n", "\n",
"const emb = await openai.embeddings.create({\n", "const emb = await openai.embeddings.create({\n",
" model: \"text-embedding-3-small\",\n", " model: \"text-embedding-3-small\",\n",