Skip to content

Commit

Permalink
fix type for execution
Browse files Browse the repository at this point in the history
  • Loading branch information
rbs333 committed Nov 26, 2024
1 parent d204584 commit 7b2800e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/user_guide/vectorizers_04.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand All @@ -781,9 +781,10 @@
"source": [
"# load expects an iterable of dictionaries where\n",
"# the vector is stored as a bytes buffer\n",
"from redisvl.redis.utils import array_to_buffer\n",
"\n",
"data = [{\"text\": t,\n",
" \"embedding\": v}\n",
" \"embedding\": array_to_buffer(v, dtype=\"float32\")}\n",
" for t, v in zip(sentences, embeddings)]\n",
"\n",
"index.load(data)"
Expand Down

0 comments on commit 7b2800e

Please sign in to comment.