浏览代码

Update StructuredLlama.ipynb

sekyonda 1 年之前
父节点
当前提交
32788cf49a
共有 1 个文件被更改,包括 8 次插入3 次删除
  1. 8 3
      demo_apps/StructuredLlama.ipynb

+ 8 - 3
demo_apps/StructuredLlama.ipynb

@@ -77,6 +77,7 @@
    "metadata": {},
    "metadata": {},
    "source": [
    "source": [
     "Next we call the Llama 2 model from replicate. In this example we will use the llama 2 13b chat model. You can find more Llama 2 models by searching for them on the [Replicate model explore page](https://replicate.com/explore?query=llama).\n",
     "Next we call the Llama 2 model from replicate. In this example we will use the llama 2 13b chat model. You can find more Llama 2 models by searching for them on the [Replicate model explore page](https://replicate.com/explore?query=llama).\n",
+    "\n",
     "You can add them here in the format: model_name/version"
     "You can add them here in the format: model_name/version"
    ]
    ]
   },
   },
@@ -100,8 +101,10 @@
    "id": "6d421ae7",
    "id": "6d421ae7",
    "metadata": {},
    "metadata": {},
    "source": [
    "source": [
-    "Next you will need create the `nba_roster.db` file. To do this run:\n",
-    "- `python txt2csv.py` to convert the `nba.txt` file to `nba_roster.csv`. The `nba.txt` file was created by scraping the NBA roster info from the web.\n",
+    "Next you will need create the `nba_roster.db` file. \n",
+    "\n",
+    "To do this run the following commands while in this folder:\n",
+    "- `python txt2csv.py`  This will convert the `nba.txt` file to `nba_roster.csv`. The `nba.txt` file was created by scraping the NBA roster info from the web.\n",
     "- Then run `python csv2db.py` to convert `nba_roster.csv` to `nba_roster.db`.\n",
     "- Then run `python csv2db.py` to convert `nba_roster.csv` to `nba_roster.db`.\n",
     "\n",
     "\n",
     "Once you have your `nba_roster.db` ready, we set up the database to be queried by Llama 2 through Langchain's [SQL chains](https://python.langchain.com/docs/use_cases/qa_structured/sql)."
     "Once you have your `nba_roster.db` ready, we set up the database to be queried by Llama 2 through Langchain's [SQL chains](https://python.langchain.com/docs/use_cases/qa_structured/sql)."
@@ -352,9 +355,11 @@
    "id": "98b2c523",
    "id": "98b2c523",
    "metadata": {},
    "metadata": {},
    "source": [
    "source": [
+    "\n",
     "Since we did not pass any context along with the follow-up to the model it did not know who \"his\" is and just picked LeBron James.\n",
     "Since we did not pass any context along with the follow-up to the model it did not know who \"his\" is and just picked LeBron James.\n",
+    "\n",
     "Let's try to fix the issue that the context (the previous question and answer) was not sent to the model along with the new question.\n",
     "Let's try to fix the issue that the context (the previous question and answer) was not sent to the model along with the new question.\n",
-    "`SQLDatabaseChain.from_llm` has a parameter \"memory\" which can be set to a `ConversationBufferMemory` instance, which looks promising."
+    "`SQLDatabaseChain.from_llm` has a parameter \"memory\" which can be set to a `ConversationBufferMemory` instance, which looks promising.\n"
    ]
    ]
   },
   },
   {
   {