-
Notifications
You must be signed in to change notification settings - Fork 125
/
policy.xml
25 lines (25 loc) · 915 Bytes
/
policy.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<policies>
<inbound>
<base />
<authentication-managed-identity resource="https://cognitiveservices.azure.com" output-token-variable-name="managed-id-access-token" ignore-error="false" />
<set-header name="Authorization" exists-action="override">
<value>@("Bearer " + (string)context.Variables["managed-id-access-token"])</value>
</set-header>
<set-backend-service backend-id="{backend-id}" />
<azure-openai-semantic-cache-lookup
score-threshold="0.8"
embeddings-backend-id ="embeddings-backend"
embeddings-backend-auth ="system-assigned" >
</azure-openai-semantic-cache-lookup>
</inbound>
<backend>
<base />
</backend>
<outbound>
<azure-openai-semantic-cache-store duration="60" />
<base />
</outbound>
<on-error>
<base />
</on-error>
</policies>