forked from stepci/stepci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openai.yml
35 lines (35 loc) · 896 Bytes
/
openai.yml
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
version: "1.1"
name: ChatGPT Query
env:
OPENAI_API_KEY: <key>
tests:
example:
steps:
- http:
method: POST
url: https://api.openai.com/v1/chat/completions
headers:
Content-Type: application/json
auth:
bearer:
token: ${{env.OPENAI_API_KEY}}
json:
{
"model": "gpt-3.5-turbo",
"messages": [
{
"role": "user",
"content": "How many countries are in the world?"
}
],
"temperature": 1,
"max_tokens": 256,
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 0
}
check:
status: 200
jsonpath:
$.choices[0].message.content:
- in: 195