File tree Expand file tree Collapse file tree 1 file changed +16
-15
lines changed
Expand file tree Collapse file tree 1 file changed +16
-15
lines changed Original file line number Diff line number Diff line change 11<policies >
22 <inbound >
33 <base />
4- <set-backend-service backend-id =" @{
5- // Determine what backend pool we use.
6- switch(context.Request.MatchedParameters[" deployment-id" ]) {
7- case " gpt-35-turbo-1106" :
8- return " {backend-id-1}" ;
94
10- case " gpt-35-turbo-0125" :
11- return " {backend-id-2}" ;
12-
13- case " gpt-4o-2024-05-13" :
14- return " {backend-id-3}" ;
15-
16- default:
17- return " {backend-id-1}" ;
18- }
19- }" />
5+ <!-- Use a <choose> block to evaluate deployment-id -->
6+ <choose >
7+ <when condition =" @(context.Request.MatchedParameters[" deployment-id" ] == " gpt-35-turbo-1106" )" >
8+ <set-backend-service backend-id =" {backend-id-1}" />
9+ </when >
10+ <when condition =" @(context.Request.MatchedParameters[" deployment-id" ] == " gpt-35-turbo-0125" )" >
11+ <set-backend-service backend-id =" {backend-id-2}" />
12+ </when >
13+ <when condition =" @(context.Request.MatchedParameters[" deployment-id" ] == " gpt-4o-2024-05-13" )" >
14+ <set-backend-service backend-id =" {backend-id-3}" />
15+ </when >
16+ <otherwise >
17+ <set-backend-service backend-id =" {backend-id-1}" />
18+ </otherwise >
19+ </choose >
2020
2121 <authentication-managed-identity resource =" https://cognitiveservices.azure.com" output-token-variable-name =" managed-id-access-token" ignore-error =" false" />
22+
2223 <set-header name =" Authorization" exists-action =" override" >
2324 <value >@("Bearer " + (string)context.Variables["managed-id-access-token"])</value >
2425 </set-header >
You can’t perform that action at this time.
0 commit comments