Skip to content

Commit a53fc13

Browse files
adds new required dtype when calling array_to_buffer
1 parent 100567f commit a53fc13

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

python-recipes/RAG/01_redisvl.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@
439439
" 'chunk_id': i,\n",
440440
" 'content': chunk.page_content,\n",
441441
" # For HASH -- must convert embeddings to bytes\n",
442-
" 'text_embedding': array_to_buffer(embeddings[i])\n",
442+
" 'text_embedding': array_to_buffer(embeddings[i], dtype='float32')\n",
443443
" } for i, chunk in enumerate(chunks)\n",
444444
"]\n",
445445
"\n",

python-recipes/RAG/04_advanced_redisvl.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@
574574
" 'chunk_id': f'{i}',\n",
575575
" 'proposition': proposition,\n",
576576
" # For HASH -- must convert embeddings to bytes\n",
577-
" 'text_embedding': array_to_buffer(prop_embeddings[i])\n",
577+
" 'text_embedding': array_to_buffer(prop_embeddings[i], dtype=\"float32\")\n",
578578
" } for i, proposition in enumerate(propositions)\n",
579579
"]\n",
580580
"\n",

0 commit comments

Comments
 (0)