Skip to content

Commit

Permalink
Merge pull request #102 from elsantorini/vectorLab
Browse files Browse the repository at this point in the history
Added Vector Lab
  • Loading branch information
denniszielke authored Apr 22, 2024
2 parents 110d453 + dadf83f commit f3d784a
Show file tree
Hide file tree
Showing 13 changed files with 536 additions and 21 deletions.
14 changes: 12 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,19 @@ AZURE_OPENAI_COMPLETION_DEPLOYMENT_NAME = "<YOUR AZURE OPENAI COMPLETIONS DEPLOY
AZURE_OPENAI_EMBEDDING_MODEL = "<YOUR OPENAI EMBEDDING MODEL NAME - e.g. text-embedding-ada-002>"
AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME = "<YOUR AZURE OPENAI EMBEDDINGS DEPLOYMENT NAME - e.g. text-embedding-ada-002>"

#return here at lab 03 to fill the connection string
MONGO_DB_CONNECTION_STRING = "mongodb+srv://<username>:<password>@<clustername>.mongocluster.cosmos.azure.com/?tls=true&authMechanism=SCRAM-SHA-256&retrywrites=false&maxIdleTimeMS=120000"
MONGO_DB_database_name = "movie_db"
MONGO_DB_collection_name = "movie_data"
MONGO_DB_cache_collection_name = "chat_cache"
MONGO_DB_semcache_collection_name = "lc_chat_cache"
MONGO_DB_chathistory_collection_name = "lc_chat_history_data"
MONGO_DB_vector_property_name = "vector"

storage_file_url = "https://cosmosdbcosmicworks.blob.core.windows.net/fabcondata/movielens_dataset.json"

#return here to fill these at lab 03 - ACS
AZURE_AI_SEARCH_SERVICE_NAME = "<YOUR AZURE AI SEARCH SERVICE NAME - e.g. ai-vectorstore-xyz>"
AZURE_AI_SEARCH_ENDPOINT = "<YOUR AZURE AI SEARCH ENDPOINT NAME - e.g. https://ai-vectorstore-xyz.search.windows.net"
AZURE_AI_SEARCH_INDEX_NAME = "<YOUR AZURE AI SEARCH INDEX NAME - e.g. ai-search-index>"
AZURE_AI_SEARCH_API_KEY = "<YOUR AZURE AI SEARCH ADMIN API KEY - get this value from the Azure portal>"

MONGO_DB_CONNECTION_STRING = "<mongodb://account:[email protected]:10255/? - Azure Cosmos DB for MongoDB get this value from the azure portal>"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ DocProject/Help/html
# Click-Once directory
publish/

.mono/**

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<values>
<value name="StillAlive" type="qword">133577438666544464</value>
</values>
1 change: 1 addition & 0 deletions labs/00-setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ With all of the above updates to the `.env` file made, make sure you save the fi

**NOTE**: The `.gitignore` file in this repo is configured to ignore the `.env` file, so the secrets such as the API key will not be uploaded to a public repo.

You can update the rest of the properties later in the labs.
___

## Next Section
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.7"
"version": "3.11.9"
},
"orig_nbformat": 4
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.7"
"version": "3.11.8"
},
"orig_nbformat": 4
},
Expand Down
4 changes: 2 additions & 2 deletions labs/02-integrating-ai/02-OpenAIPackages/openai.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -168,7 +168,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.7"
"version": "3.12.3"
},
"orig_nbformat": 4
},
Expand Down
2 changes: 1 addition & 1 deletion labs/02-integrating-ai/03-Langchain/langchain.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.7"
"version": "3.11.8"
},
"orig_nbformat": 4
},
Expand Down
5 changes: 2 additions & 3 deletions labs/03-orchestration/02-Embeddings/embeddings.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
"\n",
"# Create an instance of Azure OpenAI\n",
"llm = AzureChatOpenAI(\n",
" azure_deployment = os.getenv(\"AZURE_OPENAI_COMPLETION_DEPLOYMENT_NAME\"),\n",
" temperature = 0\n",
" azure_deployment = os.getenv(\"AZURE_OPENAI_COMPLETION_DEPLOYMENT_NAME\")\n",
")"
]
},
Expand Down Expand Up @@ -470,7 +469,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
"version": "3.12.3"
},
"orig_nbformat": 4
},
Expand Down
Loading

0 comments on commit f3d784a

Please sign in to comment.