Skip to content

Commit

Permalink
Merge pull request #112 from cohere-ai/misc-updates
Browse files Browse the repository at this point in the history
Update formatting
  • Loading branch information
mrmer1 authored Jan 30, 2024
2 parents e471d91 + c3deced commit 07a6135
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions notebooks/RAG_Chatbot_with_Chat_Embed_Rerank.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@
"from unstructured.partition.html import partition_html\n",
"from unstructured.chunking.title import chunk_by_title\n",
"\n",
"# co = cohere.Client(\"COHERE_API_KEY\")\n",
"import os\n",
"co = cohere.Client(os.getenv(\"COHERE_API_KEY\"))"
"co = cohere.Client(\"COHERE_API_KEY\")"
]
},
{
Expand Down Expand Up @@ -460,7 +458,8 @@
" \n",
" for event in response:\n",
" stream_type = type(event).__name__\n",
" # Text\n",
" \n",
" # Text\n",
" if stream_type == \"StreamTextGeneration\":\n",
" print(event.text, end=\"\")\n",
"\n",
Expand All @@ -470,7 +469,8 @@
" print(\"\\n\\nCITATIONS:\")\n",
" citations_flag = True\n",
" print(event.citations[0])\n",
" \n",
" \n",
" # Documents\n",
" if citations_flag:\n",
" if stream_type == \"StreamingChat\":\n",
" print(\"\\n\\nDOCUMENTS:\")\n",
Expand Down

0 comments on commit 07a6135

Please sign in to comment.