Skip to content

Commit 69a6a45

Browse files
committed
Addressed API version conflicts
1 parent 19460a4 commit 69a6a45

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

Quickstart-RAG/Quickstart-rag.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@
8383
"\n",
8484
"Create a virtual environment so that you can install the dependencies in isolation.\n",
8585
"\n",
86-
"1. In Visual Studio Code, press Ctrl-shift-P to open the command palette, search for \"Python: Create Environment\", and then select `Venv` to create a virtual environment in the current workspace.\n",
86+
"1. In Visual Studio Code, open the folder containing quickstart-rag.ipynb.\n",
87+
"\n",
88+
"1. Press Ctrl-shift-P to open the command palette, search for \"Python: Create Environment\", and then select `Venv` to create a virtual environment in the current workspace.\n",
8789
"\n",
8890
"1. Select Quickstart-RAG\\requirements.txt for the dependencies.\n",
8991
"\n",

Tutorial-RAG/Tutorial-rag.ipynb

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,23 @@
7272
"# \"ResourceId=/subscriptions/FAKE-SUBCRIPTION=ID/resourceGroups/FAKE-RESOURCE-GROUP/providers/Microsoft.Storage/storageAccounts/FAKE-ACCOUNT;\""
7373
]
7474
},
75+
{
76+
"cell_type": "markdown",
77+
"metadata": {},
78+
"source": [
79+
"## Create a virtual environment\n",
80+
"\n",
81+
"Create a virtual environment so that you can install the dependencies in isolation.\n",
82+
"\n",
83+
"1. In Visual Studio Code, open the folder containing tutorial-rag.ipynb.\n",
84+
"\n",
85+
"1. Press Ctrl-shift-P to open the command palette, search for \"Python: Create Environment\", and then select `Venv` to create a virtual environment in the current workspace.\n",
86+
"\n",
87+
"1. Select Tutorial-RAG\\tutorial-rag-requirements.txt for the dependencies.\n",
88+
"\n",
89+
"It takes several minutes to create the environment. When the environment is ready, continue to the next step."
90+
]
91+
},
7592
{
7693
"cell_type": "markdown",
7794
"metadata": {},
@@ -198,7 +215,7 @@
198215
" OutputFieldMappingEntry,\n",
199216
" AzureOpenAIEmbeddingSkill,\n",
200217
" EntityRecognitionSkill,\n",
201-
" SearchIndexerIndexProjections,\n",
218+
" SearchIndexerIndexProjection,\n",
202219
" SearchIndexerIndexProjectionSelector,\n",
203220
" SearchIndexerIndexProjectionsParameters,\n",
204221
" IndexProjectionMode,\n",
@@ -226,8 +243,8 @@
226243
"embedding_skill = AzureOpenAIEmbeddingSkill( \n",
227244
" description=\"Skill to generate embeddings via Azure OpenAI\", \n",
228245
" context=\"/document/pages/*\", \n",
229-
" resource_uri=AZURE_OPENAI_ACCOUNT, \n",
230-
" deployment_id=\"text-embedding-ada-002\", \n",
246+
" resource_url=AZURE_OPENAI_ACCOUNT, \n",
247+
" deployment_name=\"text-embedding-ada-002\", \n",
231248
" model_name=\"text-embedding-ada-002\",\n",
232249
" dimensions=1536,\n",
233250
" inputs=[ \n",
@@ -251,7 +268,7 @@
251268
" ]\n",
252269
")\n",
253270
" \n",
254-
"index_projections = SearchIndexerIndexProjections( \n",
271+
"index_projections = SearchIndexerIndexProjection( \n",
255272
" selectors=[ \n",
256273
" SearchIndexerIndexProjectionSelector( \n",
257274
" target_index_name=index_name, \n",
@@ -278,7 +295,7 @@
278295
" name=skillset_name, \n",
279296
" description=\"Skillset to chunk documents and generating embeddings\", \n",
280297
" skills=skills, \n",
281-
" index_projections=index_projections,\n",
298+
" index_projection=index_projections,\n",
282299
" cognitive_services_account=cognitive_services_account\n",
283300
")\n",
284301
" \n",
@@ -345,7 +362,7 @@
345362
"from azure.search.documents.models import VectorizableTextQuery\n",
346363
"\n",
347364
"# Vector Search using text-to-vector conversion of the querystring\n",
348-
"query = \"how much of earth is covered by water\" \n",
365+
"query = \"where are NASA's headquarters located?\" \n",
349366
"\n",
350367
"search_client = SearchClient(endpoint=AZURE_SEARCH_SERVICE, credential=AZURE_SEARCH_CREDENTIAL, index_name=index_name)\n",
351368
"vector_query = VectorizableTextQuery(text=query, k_nearest_neighbors=1, fields=\"text_vector\", exhaustive=True)\n",

0 commit comments

Comments
 (0)