Skip to content

Commit

Permalink
Merge branch 'main' into april2024
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkWme committed May 3, 2024
2 parents 2dc237c + e7d0ac8 commit f3af68f
Show file tree
Hide file tree
Showing 13 changed files with 561 additions and 28 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:==@account.mongo.cosmos.azure.com: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>
5 changes: 3 additions & 2 deletions labs/00-setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ On the **Develop** page you will see values for **Key 1**, **Key 2**, **Location

![Alt text](images/deployments.png)

You can see above that we have a *completions* model `gpt-35-turbo` with version `0613` and an *embeddings* model `text-embedding-ada-002` with version `2`. If you have both of these, then you're good to go. If not, click on the **+ Create new deployment** link and follow the steps to create two deployments. Ensure that one model deployment uses `text-embedding-ada-002` and the other uses a completions model such as `gpt-35-turbo`.
You can see above that we have a *completions* model `gpt-35-turbo` with version `1106` or newer and an *embeddings* model `text-embedding-ada-002` with version `2`. If you have both of these, then you're good to go. If not, click on the **+ Create new deployment** link and follow the steps to create two deployments. Ensure that one model deployment uses `text-embedding-ada-002` and the other uses a completions model such as `gpt-35-turbo`.

Make a note of both the **deployment name** and the **model name** for each of the two deployments.

Expand Down Expand Up @@ -107,8 +107,9 @@ 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

📣 [Prompts](../01-prompts/README.md)
📣 [Prompts](../01-prompts/README.md)
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
2 changes: 1 addition & 1 deletion 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
3 changes: 1 addition & 2 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
Loading

0 comments on commit f3af68f

Please sign in to comment.