Skip to content

Commit

Permalink
modified the jupyter notebook commenting format
Browse files Browse the repository at this point in the history
  • Loading branch information
dheerajreddy2020 committed Jan 18, 2025
1 parent 6a5accd commit e9482e8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cookbook/rag_with_faiss.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"metadata": {},
"outputs": [],
"source": [
"#Import all necessary libraries\n",
"# Import all necessary libraries\n",
"import requests\n",
"from langchain_openai import ChatOpenAI\n",
"from langchain_community.vectorstores import FAISS\n",
Expand Down Expand Up @@ -123,7 +123,7 @@
"import os\n",
"\n",
"if not os.environ.get(\"OPENAI_API_KEY\"):\n",
" os.environ[\"OPENAI_API_KEY\"] = getpass.getpass(\"Enter API key for OpenAI: \")\n"
" os.environ[\"OPENAI_API_KEY\"] = getpass.getpass(\"Enter API key for OpenAI: \")\n"
]
},
{
Expand Down Expand Up @@ -158,7 +158,7 @@
"metadata": {},
"outputs": [],
"source": [
"#Write the helper functions\n",
"# Write the helper functions\n",
"def process_documents(file_paths):\n",
" print(file_paths)\n",
" \"\"\"Processes and updates the vector store with new documents.\"\"\"\n",
Expand Down Expand Up @@ -262,7 +262,7 @@
}
],
"source": [
"#Create Vector embeddings\n",
"# Create Vector embeddings\n",
"process_documents(filepaths)"
]
},
Expand All @@ -282,8 +282,8 @@
}
],
"source": [
"qa_chain = get_qa_chain()\n",
"# "
"# Build QA Chain\n",
"qa_chain = get_qa_chain()"
]
},
{
Expand All @@ -301,7 +301,7 @@
}
],
"source": [
"#query the documents\n",
"# query the documents\n",
"question = 'Which company is performing better in between Nike and Puma'\n",
"response = qa_chain.invoke(question)\n",
"print(response)"
Expand Down

0 comments on commit e9482e8

Please sign in to comment.