Skip to content

Commit

Permalink
Configure Azure Developer Pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
marlenezw committed Dec 17, 2024
1 parent b244948 commit 033afd9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
16 changes: 11 additions & 5 deletions data/create-azure-search.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
# In[1]:


get_ipython().system(' pip install pandas, azure-identity, azure-search-documents, openai, python-dotenv')


# In[2]:


import os
import pandas as pd
from azure.identity import DefaultAzureCredential, get_bearer_token_provider
Expand Down Expand Up @@ -45,15 +51,15 @@
load_dotenv()


# In[2]:
# In[3]:


def delete_index(search_index_client: SearchIndexClient, search_index: str):
print(f"deleting index {search_index}")
search_index_client.delete_index(search_index)


# In[3]:
# In[4]:


def create_index_definition(name: str) -> SearchIndex:
Expand Down Expand Up @@ -137,7 +143,7 @@ def create_index_definition(name: str) -> SearchIndex:
return index


# In[4]:
# In[5]:


def gen_products(
Expand Down Expand Up @@ -176,7 +182,7 @@ def gen_products(
return items


# In[5]:
# In[6]:


aisearch_endpoint = os.environ["AZURE_SEARCH_ENDPOINT"]
Expand All @@ -193,7 +199,7 @@ def gen_products(
print(f"index {index_name} created")


# In[6]:
# In[7]:


print(f"indexing documents")
Expand Down
4 changes: 2 additions & 2 deletions infra/ai.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ deployments:
version: "2024-05-13"
sku:
name: "GlobalStandard"
capacity: 20
capacity: 19
- name: gpt-4-evals
model:
format: OpenAI
name: gpt-4
version: "0613"
sku:
name: "Standard"
capacity: 10
capacity: 8

0 comments on commit 033afd9

Please sign in to comment.