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 1 commit
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
Prev Previous commit
Next Next commit
Add ignore for .env environment files
  • Loading branch information
mrochon committed Apr 22, 2024
commit cbc63844ff2d7fcab49c2e0676a001cb18af0562
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Note: (Pre-requisite) You need to have an Azure OpenAI service already created
```
You might get some pip dependancies errors, but that is ok, the libraries were installed correctly regardless of the error.

8. Edit the file `credentials.env` with your own values from the services created in step 4.
8. Copy the file `credentials.env` to a new `.env` file and update the latter with your own values from the services created in step 4.
- For BLOB_SAS_TOKEN and BLOB_CONNECTION_STRING. Go to Storage Account>Security + networking>Shared access signature>Generate SAS
9. **Run the Notebooks in order**. They build up on top of each other.

Expand Down