-
Notifications
You must be signed in to change notification settings - Fork 40
/
tests.http
38 lines (34 loc) · 1.18 KB
/
tests.http
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
26
27
28
29
30
31
32
33
34
35
36
37
38
@apimName = <your-api-management-name>
@apiPath = openai
@azureOpenAIDeploymentId = gpt-35-turbo
@azureOpenAIApiVersion = 2023-03-15-preview
@prompt = "You are a helpful assistant."
@stream = false
@subscriptionKeyMarketing = <your-marketing-subscription-key>
@subscriptionKeyFinance = <your-finance-subscription-key>
### Test Azure API Management endpoint with OpenAI backend, with Marketing subscription key
POST https://{{apimName}}.azure-api.net/{{apiPath}}/deployments/{{azureOpenAIDeploymentId}}/chat/completions?api-version={{azureOpenAIApiVersion}}
Content-Type: application/json
api-key: {{subscriptionKeyMarketing}}
{
"messages": [
{
"role": "user",
"content": {{prompt}}
}
],
"stream": {{stream}}
}
### Test Azure API Management endpoint with OpenAI backend, with Finance subscription key
POST https://{{apimName}}.azure-api.net/{{apiPath}}/deployments/{{azureOpenAIDeploymentId}}/chat/completions?api-version={{azureOpenAIApiVersion}}
Content-Type: application/json
api-key: {{subscriptionKeyFinance}}
{
"messages": [
{
"role": "user",
"content": {{prompt}}
}
],
"stream": {{stream}}
}