Skip to content

Commit 8bc8667

Browse files
Update AzureAIStudio_index_structured_notebook.ipynb
1 parent 469dcd7 commit 8bc8667

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

notebooks/GenAI/notebooks/AzureAIStudio_index_structured_notebook.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@
166166
" azure_endpoint = os.getenv(\"AZURE_OPENAI_ENDPOINT\")\n",
167167
" )\n",
168168
"\n",
169-
"def generate_embeddings(text, model=\"text-embedding-ada-002\"):\n",
169+
"def generate_embeddings(text, model=\"text-embedding-3-small\"):\n",
170170
" return client.embeddings.create(input = [text], model=model).data[0].embedding\n",
171171
"\n",
172172
"#adding embeddings for job title to get more accurate search results\n",
173-
"df['job_title_vector'] = df['job_title'].apply(lambda x : generate_embeddings (x)) # model should be set to the deployment name you chose when you deployed the text-embedding-ada-002 (Version 2) model"
173+
"df['job_title_vector'] = df['job_title'].apply(lambda x : generate_embeddings (x)) # model should be set to the deployment name you chose when you deployed the text-embedding-3-small model"
174174
]
175175
},
176176
{
@@ -392,7 +392,7 @@
392392
"outputs": [],
393393
"source": [
394394
"endpoint = \"https://{}.search.windows.net/\".format(service_name)\n",
395-
"index_client = SearchIndexClient(endpoint, AzureKeyCredential(index_key))"
395+
"index_client = SearchIndexClient(endpoint, AzureKeyCredential(search_key))"
396396
]
397397
},
398398
{
@@ -610,7 +610,7 @@
610610
"outputs": [],
611611
"source": [
612612
"from azure.search.documents import SearchClient\n",
613-
"search_client = SearchClient(endpoint, index_name, AzureKeyCredential(index_key))"
613+
"search_client = SearchClient(endpoint, index_name, AzureKeyCredential(search_key))"
614614
]
615615
},
616616
{
@@ -741,7 +741,7 @@
741741
"outputs": [],
742742
"source": [
743743
"response = client.chat.completions.create(\n",
744-
" model=\"gpt-4\",\n",
744+
" model=\"gpt-4o\",\n",
745745
" messages=[\n",
746746
" {\"role\": \"system\", \"content\": \"You are a helpful assistant who answers only from the given Context and answers the question from the given Query. If you are asked to count then you must count all of the occurances mentioned.\"},\n",
747747
" {\"role\": \"user\", \"content\": \"Context: \"+ context + \"\\n\\n Query: \" + query}\n",

0 commit comments

Comments
 (0)