Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions api_definitions/AzureOpenAI_OpenAPI.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
},
"servers": [
{
"url": "https://example.openai.azure.com/openai",
"url": "https://demodeployment-aoai-apim.openai.azure.com/openai",
"variables": {
"endpoint": {
"default": "example.openai.azure.com"
"default": "demodeployment-aoai-apim.openai.azure.com"
}
}
}
Expand All @@ -26,20 +26,11 @@
}
],
"paths": {
"/deployments/{deployment-id}/chat/completions": {
"/responses": {
"post": {
"summary": "Creates a completion for the chat message",
"operationId": "ChatCompletions_Create",
"parameters": [
{
"in": "path",
"name": "deployment-id",
"required": true,
"schema": {
"type": "string",
"description": "Deployment id of the model which was deployed."
}
},
"parameters":
{
"in": "query",
"name": "api-version",
Expand All @@ -49,8 +40,7 @@
"example": "2023-03-15-preview",
"description": "api version"
}
}
],
},
"requestBody": {
"required": true,
"content": {
Expand Down Expand Up @@ -178,7 +168,7 @@
]
},
"example": {
"model": "gpt-35-turbo",
"model": "gpt-5-mini",
"messages": [
{
"role": "user",
Expand Down
10 changes: 5 additions & 5 deletions public-apim.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ param location string = resourceGroup().location
param apiManagementSku string = 'Developer'

@description('The name of the API publisher. This information is used by API Management.')
param apiManagementPublisherName string = 'Contoso'
param apiManagementPublisherName string = 'Nick'

@description('The email address of the API publisher. This information is used by API Management.')
param apiManagementPublisherEmail string = 'admin@contoso.com'
param apiManagementPublisherEmail string = '1@1.1'

@description('Provide the Name of the Azure Open AI service.')
param apiServiceNamePrimary string = 'Insert_Your_Azure_OpenAi_Name_Here'
param apiServiceNamePrimary string = 'demodeployment-aoai-apim'

@description('Provide the Resource Group Name of the Azure Open AI service.')
param apiServiceRgPrimary string = 'Insert_Resource_Group_Name_Here'
param apiServiceRgPrimary string = 'aoai-apim'

@description('If you want to provide resiliency when single region exceeds quota, then select Multi and provide URL to an additional Azure OpenAI endpoint. Otherwise, maintain default entry of Single and only provide one Azure OpenAI endpoint.')
@allowed([
Expand All @@ -45,7 +45,7 @@ var apiServiceUrlSecondary = 'https://${apiServiceNameSecondary}.openai.azure.co
var openApiXmlRetry = enableRetryPolicy ? 'https://raw.githubusercontent.com/microsoft/AzureOpenAI-with-APIM/main/apim_policies/AOAI_Policy-Managed_Identity_with_Retry_SingleRegion.xml' : 'https://raw.githubusercontent.com/microsoft/AzureOpenAI-with-APIM/main/apim_policies/AOAI_Policy-Managed_Identity.xml'
var openApiXml = azureOpenAiRegionType == 'Multi' ? 'https://raw.githubusercontent.com/microsoft/AzureOpenAI-with-APIM/main/apim_policies/AOAI_Policy-Managed_Identity_with_Retry_MultiRegion.xml' : openApiXmlRetry

var openApiJson = 'https://raw.githubusercontent.com/microsoft/AzureOpenAI-with-APIM/main/api_definitions/AzureOpenAI_OpenAPI.json'
var openApiJson = 'https://github.com/dinhviet44/AzureOpenAI-with-APIM-AIO/blob/main/api_definitions/AzureOpenAI_OpenAPI.json'

var apiManagementSkuCount = 1

Expand Down