Compare commits

...

1 Commits

Author SHA1 Message Date
Haotian Zhang 53f442e259 upd demo 2024-02-01 14:40:13 -08:00
+36 -7
View File
@@ -29,23 +29,23 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"# llama-parser is async-first, running the sync code in a notebook requires the use of nest_asyncio\n",
"import nest_asyncio\n",
"import os\n",
"\n",
"nest_asyncio.apply()\n",
"\n",
"import os\n",
"os.environ[\"LLAMA_CLOUD_API_KEY\"] = \"llx-...\"\n",
"os.environ[\"OPENAI_API_KEY\"] = \"sk-...\""
"os.environ[\"LLAMA_CLOUD_API_KEY\"] = \"llx-\"\n",
"os.environ[\"OPENAI_API_KEY\"] = \"sk-\""
]
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
@@ -56,7 +56,36 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1\n"
]
}
],
"source": [
"print(len(documents))"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"# save to local folder for raw output files in case reload needed\n",
"file = open('uber_local.txt', 'w')\n",
"file.write(documents[0].text)\n",
"file.close()"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
@@ -344,7 +373,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.11.6"
},
"orig_nbformat": 4
},