From 02e57474cf746c257d788632b8727ae0ddfdaba7 Mon Sep 17 00:00:00 2001 From: Shuai Shao Date: Fri, 27 Oct 2023 14:58:28 -0700 Subject: [PATCH] fix typos for QueryAgent class --- notebooks/rag.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/notebooks/rag.ipynb b/notebooks/rag.ipynb index 42adaed..6420d38 100644 --- a/notebooks/rag.ipynb +++ b/notebooks/rag.ipynb @@ -1547,11 +1547,11 @@ " contexts_results = semantic_search(\n", " query=query, \n", " embedding_model=self.embedding_model, \n", - " num_chunks=num_chunks)\n", + " k=num_chunks)\n", " \n", " # Generate response\n", - " context = [item[\"text\"] for item in context_results]\n", - " sources = [item[\"source\"] for item in context_results]\n", + " context = [item[\"text\"] for item in contexts_results]\n", + " sources = [item[\"source\"] for item in contexts_results]\n", " user_content = f\"query: {query}, context: {context}\"\n", " answer = generate_response(\n", " llm=self.llm,\n", @@ -7168,7 +7168,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.8" + "version": "3.11.4" } }, "nbformat": 4,