Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove secrets #83

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.amlignore
.env
.zip
.chroma/
.ipynb_checkpoints/
Expand Down
31 changes: 14 additions & 17 deletions 01-Load-Data-ACogSearch.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"import json\n",
"import requests\n",
"from dotenv import load_dotenv\n",
"load_dotenv(\"credentials.env\")\n",
"load_dotenv(\".env\", verbose=True, override=True)\n",
"\n",
"# Name of the container in your Blob Storage Datasource ( in credentials.env)\n",
"BLOB_CONTAINER_NAME = \"arxivcs\""
Expand All @@ -85,7 +85,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -103,7 +103,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -332,7 +332,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 7,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -477,9 +477,11 @@
"}\n",
"\n",
"r = requests.put(os.environ['AZURE_SEARCH_ENDPOINT'] + \"/skillsets/\" + skillset_name,\n",
" data=json.dumps(skillset_payload), headers=headers, params=params)\n",
" json=skillset_payload, headers=headers, params=params)\n",
"print(r.status_code)\n",
"print(r.ok)"
"print(r.ok)\n",
"if not r.ok:\n",
" print(r.text)"
]
},
{
Expand Down Expand Up @@ -579,7 +581,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 8,
"metadata": {
"tags": []
},
Expand All @@ -589,8 +591,8 @@
"output_type": "stream",
"text": [
"200\n",
"Status: success\n",
"Items Processed: 0\n",
"Status: transientFailure\n",
"Items Processed: 1169\n",
"True\n"
]
}
Expand Down Expand Up @@ -646,9 +648,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.10 - SDK v2",
"display_name": "Python 3",
"language": "python",
"name": "python310-sdkv2"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -660,12 +662,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
},
"vscode": {
"interpreter": {
"hash": "9ff083f0c83558f9261023d47a77b9b3eb892c62cdbe066d046abcad1a5edb5c"
}
"version": "3.12.1"
}
},
"nbformat": 4,
Expand Down
113 changes: 60 additions & 53 deletions 02-LoadCSVOneToMany-ACogSearch.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"import json\n",
"import requests\n",
"from dotenv import load_dotenv\n",
"load_dotenv(\"credentials.env\")\n",
"load_dotenv(\".env\", verbose=True, override=True)\n",
"\n",
"# Name of the container in your Blob Storage Datasource ( in credentials.env)\n",
"BLOB_CONTAINER_NAME = \"cord19\""
Expand Down Expand Up @@ -143,74 +143,81 @@
"No. of lines: 90000\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Matplotlib is building the font cache; this may take a moment.\n"
]
},
{
"data": {
"text/html": [
"<style type=\"text/css\">\n",
"</style>\n",
"<table id=\"T_dea2b\">\n",
"<table id=\"T_7d742\">\n",
" <thead>\n",
" <tr>\n",
" <th class=\"blank level0\" >&nbsp;</th>\n",
" <th id=\"T_dea2b_level0_col0\" class=\"col_heading level0 col0\" >cord_uid</th>\n",
" <th id=\"T_dea2b_level0_col1\" class=\"col_heading level0 col1\" >source_x</th>\n",
" <th id=\"T_dea2b_level0_col2\" class=\"col_heading level0 col2\" >title</th>\n",
" <th id=\"T_dea2b_level0_col3\" class=\"col_heading level0 col3\" >abstract</th>\n",
" <th id=\"T_dea2b_level0_col4\" class=\"col_heading level0 col4\" >authors</th>\n",
" <th id=\"T_dea2b_level0_col5\" class=\"col_heading level0 col5\" >url</th>\n",
" <th id=\"T_7d742_level0_col0\" class=\"col_heading level0 col0\" >cord_uid</th>\n",
" <th id=\"T_7d742_level0_col1\" class=\"col_heading level0 col1\" >source_x</th>\n",
" <th id=\"T_7d742_level0_col2\" class=\"col_heading level0 col2\" >title</th>\n",
" <th id=\"T_7d742_level0_col3\" class=\"col_heading level0 col3\" >abstract</th>\n",
" <th id=\"T_7d742_level0_col4\" class=\"col_heading level0 col4\" >authors</th>\n",
" <th id=\"T_7d742_level0_col5\" class=\"col_heading level0 col5\" >url</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th id=\"T_dea2b_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
" <td id=\"T_dea2b_row0_col0\" class=\"data row0 col0\" >ug7v899j</td>\n",
" <td id=\"T_dea2b_row0_col1\" class=\"data row0 col1\" >PMC</td>\n",
" <td id=\"T_dea2b_row0_col2\" class=\"data row0 col2\" >Clinical features of culture-p...</td>\n",
" <td id=\"T_dea2b_row0_col3\" class=\"data row0 col3\" >OBJECTIVE: This retrospective ...</td>\n",
" <td id=\"T_dea2b_row0_col4\" class=\"data row0 col4\" >Madani, Tariq A; Al-Ghamdi, Ai...</td>\n",
" <td id=\"T_dea2b_row0_col5\" class=\"data row0 col5\" ><a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC35282/\">https://www.ncbi.nlm.nih.gov/pmc/articles/PMC35282/</a></td>\n",
" <th id=\"T_7d742_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
" <td id=\"T_7d742_row0_col0\" class=\"data row0 col0\" >ug7v899j</td>\n",
" <td id=\"T_7d742_row0_col1\" class=\"data row0 col1\" >PMC</td>\n",
" <td id=\"T_7d742_row0_col2\" class=\"data row0 col2\" >Clinical features of culture-p...</td>\n",
" <td id=\"T_7d742_row0_col3\" class=\"data row0 col3\" >OBJECTIVE: This retrospective ...</td>\n",
" <td id=\"T_7d742_row0_col4\" class=\"data row0 col4\" >Madani, Tariq A; Al-Ghamdi, Ai...</td>\n",
" <td id=\"T_7d742_row0_col5\" class=\"data row0 col5\" ><a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC35282/\">https://www.ncbi.nlm.nih.gov/pmc/articles/PMC35282/</a></td>\n",
" </tr>\n",
" <tr>\n",
" <th id=\"T_dea2b_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
" <td id=\"T_dea2b_row1_col0\" class=\"data row1 col0\" >02tnwd4m</td>\n",
" <td id=\"T_dea2b_row1_col1\" class=\"data row1 col1\" >PMC</td>\n",
" <td id=\"T_dea2b_row1_col2\" class=\"data row1 col2\" >Nitric oxide: a pro-inflammato...</td>\n",
" <td id=\"T_dea2b_row1_col3\" class=\"data row1 col3\" >Inflammatory diseases of the r...</td>\n",
" <td id=\"T_dea2b_row1_col4\" class=\"data row1 col4\" >Vliet, Albert van der; Eiseric...</td>\n",
" <td id=\"T_dea2b_row1_col5\" class=\"data row1 col5\" ><a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC59543/\">https://www.ncbi.nlm.nih.gov/pmc/articles/PMC59543/</a></td>\n",
" <th id=\"T_7d742_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
" <td id=\"T_7d742_row1_col0\" class=\"data row1 col0\" >02tnwd4m</td>\n",
" <td id=\"T_7d742_row1_col1\" class=\"data row1 col1\" >PMC</td>\n",
" <td id=\"T_7d742_row1_col2\" class=\"data row1 col2\" >Nitric oxide: a pro-inflammato...</td>\n",
" <td id=\"T_7d742_row1_col3\" class=\"data row1 col3\" >Inflammatory diseases of the r...</td>\n",
" <td id=\"T_7d742_row1_col4\" class=\"data row1 col4\" >Vliet, Albert van der; Eiseric...</td>\n",
" <td id=\"T_7d742_row1_col5\" class=\"data row1 col5\" ><a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC59543/\">https://www.ncbi.nlm.nih.gov/pmc/articles/PMC59543/</a></td>\n",
" </tr>\n",
" <tr>\n",
" <th id=\"T_dea2b_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
" <td id=\"T_dea2b_row2_col0\" class=\"data row2 col0\" >ejv2xln0</td>\n",
" <td id=\"T_dea2b_row2_col1\" class=\"data row2 col1\" >PMC</td>\n",
" <td id=\"T_dea2b_row2_col2\" class=\"data row2 col2\" >Surfactant protein-D and pulmo...</td>\n",
" <td id=\"T_dea2b_row2_col3\" class=\"data row2 col3\" >Surfactant protein-D (SP-D) pa...</td>\n",
" <td id=\"T_dea2b_row2_col4\" class=\"data row2 col4\" >Crouch, Erika C...</td>\n",
" <td id=\"T_dea2b_row2_col5\" class=\"data row2 col5\" ><a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC59549/\">https://www.ncbi.nlm.nih.gov/pmc/articles/PMC59549/</a></td>\n",
" <th id=\"T_7d742_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
" <td id=\"T_7d742_row2_col0\" class=\"data row2 col0\" >ejv2xln0</td>\n",
" <td id=\"T_7d742_row2_col1\" class=\"data row2 col1\" >PMC</td>\n",
" <td id=\"T_7d742_row2_col2\" class=\"data row2 col2\" >Surfactant protein-D and pulmo...</td>\n",
" <td id=\"T_7d742_row2_col3\" class=\"data row2 col3\" >Surfactant protein-D (SP-D) pa...</td>\n",
" <td id=\"T_7d742_row2_col4\" class=\"data row2 col4\" >Crouch, Erika C...</td>\n",
" <td id=\"T_7d742_row2_col5\" class=\"data row2 col5\" ><a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC59549/\">https://www.ncbi.nlm.nih.gov/pmc/articles/PMC59549/</a></td>\n",
" </tr>\n",
" <tr>\n",
" <th id=\"T_dea2b_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
" <td id=\"T_dea2b_row3_col0\" class=\"data row3 col0\" >2b73a28n</td>\n",
" <td id=\"T_dea2b_row3_col1\" class=\"data row3 col1\" >PMC</td>\n",
" <td id=\"T_dea2b_row3_col2\" class=\"data row3 col2\" >Role of endothelin-1 in lung d...</td>\n",
" <td id=\"T_dea2b_row3_col3\" class=\"data row3 col3\" >Endothelin-1 (ET-1) is a 21 am...</td>\n",
" <td id=\"T_dea2b_row3_col4\" class=\"data row3 col4\" >Fagan, Karen A; McMurtry, Ivan...</td>\n",
" <td id=\"T_dea2b_row3_col5\" class=\"data row3 col5\" ><a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC59574/\">https://www.ncbi.nlm.nih.gov/pmc/articles/PMC59574/</a></td>\n",
" <th id=\"T_7d742_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
" <td id=\"T_7d742_row3_col0\" class=\"data row3 col0\" >2b73a28n</td>\n",
" <td id=\"T_7d742_row3_col1\" class=\"data row3 col1\" >PMC</td>\n",
" <td id=\"T_7d742_row3_col2\" class=\"data row3 col2\" >Role of endothelin-1 in lung d...</td>\n",
" <td id=\"T_7d742_row3_col3\" class=\"data row3 col3\" >Endothelin-1 (ET-1) is a 21 am...</td>\n",
" <td id=\"T_7d742_row3_col4\" class=\"data row3 col4\" >Fagan, Karen A; McMurtry, Ivan...</td>\n",
" <td id=\"T_7d742_row3_col5\" class=\"data row3 col5\" ><a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC59574/\">https://www.ncbi.nlm.nih.gov/pmc/articles/PMC59574/</a></td>\n",
" </tr>\n",
" <tr>\n",
" <th id=\"T_dea2b_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
" <td id=\"T_dea2b_row4_col0\" class=\"data row4 col0\" >9785vg6d</td>\n",
" <td id=\"T_dea2b_row4_col1\" class=\"data row4 col1\" >PMC</td>\n",
" <td id=\"T_dea2b_row4_col2\" class=\"data row4 col2\" >Gene expression in epithelial ...</td>\n",
" <td id=\"T_dea2b_row4_col3\" class=\"data row4 col3\" >Respiratory syncytial virus (R...</td>\n",
" <td id=\"T_dea2b_row4_col4\" class=\"data row4 col4\" >Domachowske, Joseph B; Bonvill...</td>\n",
" <td id=\"T_dea2b_row4_col5\" class=\"data row4 col5\" ><a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC59580/\">https://www.ncbi.nlm.nih.gov/pmc/articles/PMC59580/</a></td>\n",
" <th id=\"T_7d742_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
" <td id=\"T_7d742_row4_col0\" class=\"data row4 col0\" >9785vg6d</td>\n",
" <td id=\"T_7d742_row4_col1\" class=\"data row4 col1\" >PMC</td>\n",
" <td id=\"T_7d742_row4_col2\" class=\"data row4 col2\" >Gene expression in epithelial ...</td>\n",
" <td id=\"T_7d742_row4_col3\" class=\"data row4 col3\" >Respiratory syncytial virus (R...</td>\n",
" <td id=\"T_7d742_row4_col4\" class=\"data row4 col4\" >Domachowske, Joseph B; Bonvill...</td>\n",
" <td id=\"T_7d742_row4_col5\" class=\"data row4 col5\" ><a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC59580/\">https://www.ncbi.nlm.nih.gov/pmc/articles/PMC59580/</a></td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n"
],
"text/plain": [
"<pandas.io.formats.style.Styler at 0x7f0ca0a41ff0>"
"<pandas.io.formats.style.Styler at 0x21b55823020>"
]
},
"execution_count": 6,
Expand Down Expand Up @@ -253,7 +260,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 7,
"id": "74913764-9dfb-4646-aac8-d389cd4533e6",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -354,7 +361,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 8,
"id": "b46cfa90-28b4-4602-b6ff-743a3407fd72",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -472,7 +479,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 9,
"id": "b87b8ebd-8091-43b6-9124-cc17021cfb78",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -521,7 +528,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 10,
"id": "6132c041-7213-410e-a206-1a8c7385128e",
"metadata": {},
"outputs": [
Expand All @@ -530,8 +537,8 @@
"output_type": "stream",
"text": [
"200\n",
"Status: inProgress\n",
"Items Processed: 209\n",
"Status: success\n",
"Items Processed: 0\n",
"True\n"
]
}
Expand Down Expand Up @@ -590,9 +597,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.10 - SDK v2",
"display_name": "Python 3",
"language": "python",
"name": "python310-sdkv2"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -604,7 +611,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.12.1"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion 03-Quering-AOpenAI.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"from common.utils import get_search_results\n",
"\n",
"from dotenv import load_dotenv\n",
"load_dotenv(\"credentials.env\")"
"load_dotenv(\".env\", verbose=True, override=True)"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion 04-Complex-Docs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"from IPython.display import Markdown, HTML, display \n",
"\n",
"from dotenv import load_dotenv\n",
"load_dotenv(\"credentials.env\")\n",
"load_dotenv(\".env\", verbose=True, override=True)\n",
"\n",
"def printmd(string):\n",
" display(Markdown(string))\n",
Expand Down
2 changes: 1 addition & 1 deletion 05-Adding_Memory.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"from common.prompts import DOCSEARCH_PROMPT\n",
"\n",
"from dotenv import load_dotenv\n",
"load_dotenv(\"credentials.env\")\n",
"load_dotenv(\".env\", verbose=True, override=True)\n",
"\n",
"import logging\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion 06-First-RAG.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
" display(Markdown(string))\n",
"\n",
"from dotenv import load_dotenv\n",
"load_dotenv(\"credentials.env\")\n"
"load_dotenv(\".env\", verbose=True, override=True)\n"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion 07-TabularDataQA.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"from IPython.display import Markdown, HTML, display \n",
"\n",
"from dotenv import load_dotenv\n",
"load_dotenv(\"credentials.env\")\n",
"load_dotenv(\".env\", verbose=True, override=True)\n",
"\n",
"def printmd(string):\n",
" display(Markdown(string))"
Expand Down
2 changes: 1 addition & 1 deletion 08-SQLDB_QA.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"from IPython.display import Markdown, HTML, display \n",
"\n",
"from dotenv import load_dotenv\n",
"load_dotenv(\"credentials.env\")\n",
"load_dotenv(\".env\", verbose=True, override=True)\n",
"\n",
"def printmd(string):\n",
" display(Markdown(string))"
Expand Down
2 changes: 1 addition & 1 deletion 09-BingChatClone.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
" display(Markdown(string.replace(\"$\",\"USD \")))\n",
"\n",
"from dotenv import load_dotenv\n",
"load_dotenv(\"credentials.env\")\n"
"load_dotenv(\".env\", verbose=True, override=True)\n"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion 10-API-Search.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"from IPython.display import Markdown, HTML, display \n",
"\n",
"from dotenv import load_dotenv\n",
"load_dotenv(\"credentials.env\")\n",
"load_dotenv(\".env\", verbose=True, override=True)\n",
"\n",
"def printmd(string):\n",
" display(Markdown(string.replace(\"$\",\"USD \")))\n"
Expand Down
2 changes: 1 addition & 1 deletion 11-Smart_Agent.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"from common.prompts import CUSTOM_CHATBOT_PROMPT \n",
"\n",
"from dotenv import load_dotenv\n",
"load_dotenv(\"credentials.env\")\n",
"load_dotenv(\".env\", verbose=True, override=True)\n",
"\n",
"from IPython.display import Markdown, HTML, display \n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion 11.5-Smart_Agent-LangGraph.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"from common.prompts import CUSTOM_CHATBOT_PROMPT, CUSTOM_CHATBOT_PREFIX\n",
"\n",
"from dotenv import load_dotenv\n",
"load_dotenv(\"credentials.env\")\n",
"load_dotenv(\".env\", verbose=True, override=True)\n",
"\n",
"from IPython.display import Markdown, HTML, display \n",
"\n",
Expand Down
Loading