partner-upstage[patch]: embeddings empty list bug (#22057)

Fixed an error in `embed_documents` when the input was given as an empty
list. And I have revised the document.
This commit is contained in:
JuHyung Son
2024-05-24 00:44:30 +09:00
committed by GitHub
parent 2df8ac402a
commit d9eff44400
6 changed files with 30 additions and 10 deletions

View File

@@ -36,7 +36,9 @@
"\n",
"docs = loader.load()\n",
"\n",
"vectorstore = DocArrayInMemorySearch.from_documents(docs, embedding=UpstageEmbeddings())\n",
"vectorstore = DocArrayInMemorySearch.from_documents(\n",
" docs, embedding=UpstageEmbeddings(model=\"solar-embedding-1-large\")\n",
")\n",
"retriever = vectorstore.as_retriever()\n",
"\n",
"template = \"\"\"Answer the question based only on the following context:\n",