-
Notifications
You must be signed in to change notification settings - Fork 0
/
openai.http
54 lines (46 loc) · 1.95 KB
/
openai.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
### What models we can use
GET https://api.openai.com/v1/models
Authorization: Bearer {{openaiToken}}
### text-davinci-003
POST https://api.openai.com/v1/completions
Authorization: Bearer {{openaiToken}}
Content-Type: application/json
{
"model": "text-davinci-003",
"prompt": "Write an exciting 1000 word story for young children about dinosaurs in English. And a title for this story separately.",
"max_tokens": 4000,
"temperature": 1
}
### gpt-3.5-turbo
POST https://api.openai.com/v1/chat/completions
Authorization: Bearer {{openaiToken}}
Content-Type: application/json
{
"model": "gpt-3.5-turbo",
"messages": [
{"role": "system", "content": "You are a story writer for young children who writes in English."},
{"role": "user", "content": "Give me a title for an exciting story about cars, without quotes"}
]
}
### gpt-3.5-turbo
POST https://api.openai.com/v1/chat/completions
Authorization: Bearer {{openaiToken}}
Content-Type: application/json
{
"model": "gpt-3.5-turbo",
"messages": [
{"role": "system", "content": "You are a story writer for young children who writes in English."},
{"role": "system", "content": "And reply in JSON"},
{"role": "user", "content": "Give me a title for an exciting story about anything"}
]
}
### gpt-3.5-turbo
POST https://api.openai.com/v1/chat/completions
Authorization: Bearer {{openaiToken}}
Content-Type: application/json
{
"model": "gpt-3.5-turbo",
"messages": [
{"role": "user", "content": "Please create a 100 word engaging bedtime story based on the title provided here: [Dino World Adventure: A Timeless Tale of Prehistoric Monsters.]. The story should be age-appropriate and suitable for children, with a clear beginning, middle, and end. The story should capture the reader's imagination and emotions, with characters that are relatable and memorable. The story's theme or moral should be positive and inspiring, teaching children important lessons about kindness, hope, or perseverance."}
]
}