|
43 | 43 | parser.add_argument('--search_endpoint', required=True, help='Azure AI Search endpoint') |
44 | 44 | parser.add_argument('--openai_endpoint', required=True, help='Azure OpenAI endpoint') |
45 | 45 | parser.add_argument('--ai_project_endpoint', required=True, help='Azure AI Project endpoint') |
46 | | -parser.add_argument('--openai_api_version', required=True, help='Azure OpenAI API version') |
47 | 46 | parser.add_argument('--deployment_model', required=True, help='Azure OpenAI deployment model name') |
48 | 47 | parser.add_argument('--embedding_model', required=True, help='Azure OpenAI embedding model name') |
49 | | -parser.add_argument('--storage_account', required=True, help='Azure Storage Account name') |
| 48 | +parser.add_argument('--storage_account_name', required=True, help='Azure Storage Account name') |
50 | 49 | parser.add_argument('--sql_server', required=True, help='Azure SQL Server name') |
51 | 50 | parser.add_argument('--sql_database', required=True, help='Azure SQL Database name') |
52 | 51 | parser.add_argument('--cu_endpoint', required=True, help='Azure Content Understanding endpoint') |
| 52 | +parser.add_argument('--cu_api_version', required=True, help='Azure Content Understanding API version') |
53 | 53 |
|
54 | 54 | args = parser.parse_args() |
55 | 55 |
|
56 | 56 | # Assign arguments to variables |
57 | 57 | SEARCH_ENDPOINT = args.search_endpoint |
58 | 58 | OPENAI_ENDPOINT = args.openai_endpoint |
59 | 59 | AI_PROJECT_ENDPOINT = args.ai_project_endpoint |
60 | | -AZURE_AI_API_VERSION = args.openai_api_version |
61 | 60 | DEPLOYMENT_MODEL = args.deployment_model |
62 | 61 | EMBEDDING_MODEL = args.embedding_model |
63 | | -STORAGE_ACCOUNT_NAME = args.storage_account |
| 62 | +STORAGE_ACCOUNT_NAME = args.storage_account_name |
64 | 63 | SQL_SERVER = args.sql_server |
65 | 64 | SQL_DATABASE = args.sql_database |
66 | 65 | CU_ENDPOINT = args.cu_endpoint |
| 66 | +CU_API_VERSION = args.cu_api_version |
67 | 67 |
|
68 | 68 | print("Command-line arguments parsed.") |
69 | 69 |
|
@@ -185,12 +185,11 @@ def create_search_index(): |
185 | 185 | print("SQL Server connection established.") |
186 | 186 |
|
187 | 187 | # Content Understanding client |
188 | | -AZURE_AI_API_VERSION = "2024-12-01-preview" |
189 | 188 | cu_credential = AzureCliCredential() |
190 | 189 | cu_token_provider = get_bearer_token_provider(cu_credential, "https://cognitiveservices.azure.com/.default") |
191 | 190 | cu_client = AzureContentUnderstandingClient( |
192 | 191 | endpoint=CU_ENDPOINT, |
193 | | - api_version=AZURE_AI_API_VERSION, |
| 192 | + api_version=CU_API_VERSION, |
194 | 193 | token_provider=cu_token_provider |
195 | 194 | ) |
196 | 195 | print("Content Understanding client initialized.") |
|
0 commit comments