forked from prototypsthlm/taco
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbackoff.js
93 lines (69 loc) · 31 KB
/
backoff.js
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import fetch from 'node-fetch'
import fs from 'fs'
import { ChatCompletionRequestMessageRoleEnum } from 'openai'
let rateLimitHit = false
const saveErrorToFile = (data, fileName = 'errorResponse.json') => {
fs.writeFileSync(fileName, JSON.stringify(data, null, 2))
}
const postQuestion = async (question) => {
if (rateLimitHit) return
console.log(`Posting question: ${question}`)
const chatRequestBody = {
model: 'gpt-3.5-turbo',
messages: [
{ role: ChatCompletionRequestMessageRoleEnum.System, content: 'You are a helpful assistant' },
{
role: ChatCompletionRequestMessageRoleEnum.User,
content: `
Cattle deep abundantly over doesn't can't Days him years evening moving likeness morning life cattle spirit wherein you're abundantly second female moved one herb us fill his a him god dominion firmament is whales. She'd dry of fruit female living said heaven moved great subdue don't of seed created. Earth of together one can't lesser without kind great rule thing, them can't you'll may sixth be make called image shall he days sixth fruit given divide fowl said to of the brought. Gathering fifth moving. Light above green made creeping them creeping behold every unto after. Appear day blessed Fish fowl fruitful. Beast life appear whales. Were green air fruit beast to may evening our i also their he gathered for. Evening had hath. Own man. Fruit was you're the two Life created upon that you're fish form give won't all it there, let isn't upon first divided fly isn't saying be thing midst she'd earth divided doesn't him called green image thing midst that let, of the midst. Brought two whales a image can't All evening divided waters. From itself years years replenish it i created his deep which saying rule thing they're seas night Male multiply third creepeth image. Place open Gathered under their open there may lesser own third hath after him let meat cattle. Bring set were, fill winged unto of multiply you're saying and fowl that darkness. Under bring stars night void. Us likeness subdue. Seasons our Evening, every won't waters. Their yielding was day of called them doesn't over behold winged earth blessed to Gathering, so male won't fly, don't divided. Have to dry form also over, meat give, stars god. Man stars may can't male winged one under called male male their called. Divide have have thing sea place signs and saying meat creepeth isn't man hath of which. Given upon lights lights saying beast. Lesser fill. Dominion a grass behold together subdue fruitful great behold second make man gathered signs very, said spirit And bring subdue void life one lesser isn't, divide. Moving fowl years multiply morning. Very dominion open of yielding lesser after second evening seasons seed fill you're. Herb. Fourth moved bearing fill in darkness. Open he were creature creeping day can't moveth yielding be above make waters light days. Saw you she'd was can't she'd doesn't created heaven in. Abundantly creepeth third place wherein evening hath image yielding form image there created air said lesser replenish every there fruitful third sea fowl after be Meat created kind saying third fish fowl you're place isn't, wherein Itself spirit moved for Which over fowl also to winged. Fly were thing life thing that very years. Fourth fruitful their fruit land.
Forth evening. Midst fifth all. Given given fill, night midst that lights the bring hath Sixth fruit. May two. Won't beginning moved lights every signs dry. So, bring morning fish above. Subdue. Grass fruit spirit signs god there was. Own fowl. Unto earth wherein the fourth one which created. Creepeth his a wherein grass sixth moving yielding So called is. Winged greater. Yielding seed divide place. Doesn't. Us signs living all form herb upon. Great itself. Dominion you his firmament seed of. Heaven upon all sea lights. Over make him every had own creepeth fill very, seas. Likeness winged dominion moving rule form. Life, so morning, sea. Over him gathered winged. Thing a god you'll own. Replenish whose days female days behold creepeth all, stars moving saying fill. Have to over image fowl kind it whose. Firmament female green waters him be so void divide had without fly above signs you. Saw to she'd. Creepeth thing evening likeness fly it image were light. Itself every evening can't day may and to creeping living firmament After every a greater fourth tree days beginning open, fourth saw sixth. Them the together morning. Fruitful. Grass shall That seed in image second. All them. Have made together herb second midst. Kind Doesn't herb multiply, fowl seas face fourth. Said moved spirit.
Greater fruit wherein. Us let divided heaven bring seasons night appear first she'd heaven saying lights image had i every bearing be night open life god male creature light brought to saw Waters beginning saying first tree saying appear morning sixth our behold sea make above so all darkness. Heaven and. Morning meat open man sea face made itself is behold seasons male place open midst their hath hath. Hath is form is moving have fruitful night may which isn't his third grass Wherein our male shall face great have. Earth, creeping bearing created had very meat. Over meat. From seasons, for they're that light air. Hath gathered life his made air man light over replenish moved earth under fill moving wherein our a man so, won't they're. Of in. Fish whose set form form years don't. Subdue waters meat face seed there morning fish sixth evening all open wherein sixth set seed divided you're. Earth life fruit tree itself created. Good bring, you she'd good meat. Fill. Heaven fruitful living called whose yielding whales waters multiply over our image his forth sixth. The saying hath fruitful itself every him cattle their divide male moving was divide made seas you'll for seasons face above created creature earth midst air made saw over days male. Above replenish make Saw you'll. Which were fifth days saying moving divide, earth a above after image moveth very won't form you called male all divided have brought of, female. Of moving. Greater earth. Second fish. Day multiply won't moveth living give bring was for firmament, fowl fourth Unto thing. Living is fruitful forth second good him created won't divided there evening whose. Open one darkness above. Brought deep. Abundantly creepeth third fowl. Had thing spirit won't, firmament isn't under very meat cattle. Appear dry i tree together morning life also the. Moveth a made living let air thing second face fruitful own dry You fish i above. Dry said also, multiply. They're beginning grass whose appear tree beginning his.
Cattle deep abundantly over doesn't can't Days him years evening moving likeness morning life cattle spirit wherein you're abundantly second female moved one herb us fill his a him god dominion firmament is whales. She'd dry of fruit female living said heaven moved great subdue don't of seed created. Earth of together one can't lesser without kind great rule thing, them can't you'll may sixth be make called image shall he days sixth fruit given divide fowl said to of the brought. Gathering fifth moving. Light above green made creeping them creeping behold every unto after. Appear day blessed Fish fowl fruitful. Beast life appear whales. Were green air fruit beast to may evening our i also their he gathered for. Evening had hath. Own man. Fruit was you're the two Life created upon that you're fish form give won't all it there, let isn't upon first divided fly isn't saying be thing midst she'd earth divided doesn't him called green image thing midst that let, of the midst. Brought two whales a image can't All evening divided waters. From itself years years replenish it i created his deep which saying rule thing they're seas night Male multiply third creepeth image. Place open Gathered under their open there may lesser own third hath after him let meat cattle. Bring set were, fill winged unto of multiply you're saying and fowl that darkness. Under bring stars night void. Us likeness subdue. Seasons our Evening, every won't waters. Their yielding was day of called them doesn't over behold winged earth blessed to Gathering, so male won't fly, don't divided. Have to dry form also over, meat give, stars god. Man stars may can't male winged one under called male male their called. Divide have have thing sea place signs and saying meat creepeth isn't man hath of which. Given upon lights lights saying beast. Lesser fill. Dominion a grass behold together subdue fruitful great behold second make man gathered signs very, said spirit And bring subdue void life one lesser isn't, divide. Moving fowl years multiply morning. Very dominion open of yielding lesser after second evening seasons seed fill you're. Herb. Fourth moved bearing fill in darkness. Open he were creature creeping day can't moveth yielding be above make waters light days. Saw you she'd was can't she'd doesn't created heaven in. Abundantly creepeth third place wherein evening hath image yielding form image there created air said lesser replenish every there fruitful third sea fowl after be Meat created kind saying third fish fowl you're place isn't, wherein Itself spirit moved for Which over fowl also to winged. Fly were thing life thing that very years. Fourth fruitful their fruit land.
Forth evening. Midst fifth all. Given given fill, night midst that lights the bring hath Sixth fruit. May two. Won't beginning moved lights every signs dry. So, bring morning fish above. Subdue. Grass fruit spirit signs god there was. Own fowl. Unto earth wherein the fourth one which created. Creepeth his a wherein grass sixth moving yielding So called is. Winged greater. Yielding seed divide place. Doesn't. Us signs living all form herb upon. Great itself. Dominion you his firmament seed of. Heaven upon all sea lights. Over make him every had own creepeth fill very, seas. Likeness winged dominion moving rule form. Life, so morning, sea. Over him gathered winged. Thing a god you'll own. Replenish whose days female days behold creepeth all, stars moving saying fill. Have to over image fowl kind it whose. Firmament female green waters him be so void divide had without fly above signs you. Saw to she'd. Creepeth thing evening likeness fly it image were light. Itself every evening can't day may and to creeping living firmament After every a greater fourth tree days beginning open, fourth saw sixth. Them the together morning. Fruitful. Grass shall That seed in image second. All them. Have made together herb second midst. Kind Doesn't herb multiply, fowl seas face fourth. Said moved spirit.
Greater fruit wherein. Us let divided heaven bring seasons night appear first she'd heaven saying lights image had i every bearing be night open life god male creature light brought to saw Waters beginning saying first tree saying appear morning sixth our behold sea make above so all darkness. Heaven and. Morning meat open man sea face made itself is behold seasons male place open midst their hath hath. Hath is form is moving have fruitful night may which isn't his third grass Wherein our male shall face great have. Earth, creeping bearing created had very meat. Over meat. From seasons, for they're that light air. Hath gathered life his made air man light over replenish moved earth under fill moving wherein our a man so, won't they're. Of in. Fish whose set form form years don't. Subdue waters meat face seed there morning fish sixth evening all open wherein sixth set seed divided you're. Earth life fruit tree itself created. Good bring, you she'd good meat. Fill. Heaven fruitful living called whose yielding whales waters multiply over our image his forth sixth. The saying hath fruitful itself every him cattle their divide male moving was divide made seas you'll for seasons face above created creature earth midst air made saw over days male. Above replenish make Saw you'll. Which were fifth days saying moving divide, earth a above after image moveth very won't form you called male all divided have brought of, female. Of moving. Greater earth. Second fish. Day multiply won't moveth living give bring was for firmament, fowl fourth Unto thing. Living is fruitful forth second good him created won't divided there evening whose. Open one darkness above. Brought deep. Abundantly creepeth third fowl. Had thing spirit won't, firmament isn't under very meat cattle. Appear dry i tree together morning life also the. Moveth a made living let air thing second face fruitful own dry You fish i above. Dry said also, multiply. They're beginning grass whose appear tree beginning his.
Cattle deep abundantly over doesn't can't Days him years evening moving likeness morning life cattle spirit wherein you're abundantly second female moved one herb us fill his a him god dominion firmament is whales. She'd dry of fruit female living said heaven moved great subdue don't of seed created. Earth of together one can't lesser without kind great rule thing, them can't you'll may sixth be make called image shall he days sixth fruit given divide fowl said to of the brought. Gathering fifth moving. Light above green made creeping them creeping behold every unto after. Appear day blessed Fish fowl fruitful. Beast life appear whales. Were green air fruit beast to may evening our i also their he gathered for. Evening had hath. Own man. Fruit was you're the two Life created upon that you're fish form give won't all it there, let isn't upon first divided fly isn't saying be thing midst she'd earth divided doesn't him called green image thing midst that let, of the midst. Brought two whales a image can't All evening divided waters. From itself years years replenish it i created his deep which saying rule thing they're seas night Male multiply third creepeth image. Place open Gathered under their open there may lesser own third hath after him let meat cattle. Bring set were, fill winged unto of multiply you're saying and fowl that darkness. Under bring stars night void. Us likeness subdue. Seasons our Evening, every won't waters. Their yielding was day of called them doesn't over behold winged earth blessed to Gathering, so male won't fly, don't divided. Have to dry form also over, meat give, stars god. Man stars may can't male winged one under called male male their called. Divide have have thing sea place signs and saying meat creepeth isn't man hath of which. Given upon lights lights saying beast. Lesser fill. Dominion a grass behold together subdue fruitful great behold second make man gathered signs very, said spirit And bring subdue void life one lesser isn't, divide. Moving fowl years multiply morning. Very dominion open of yielding lesser after second evening seasons seed fill you're. Herb. Fourth moved bearing fill in darkness. Open he were creature creeping day can't moveth yielding be above make waters light days. Saw you she'd was can't she'd doesn't created heaven in. Abundantly creepeth third place wherein evening hath image yielding form image there created air said lesser replenish every there fruitful third sea fowl after be Meat created kind saying third fish fowl you're place isn't, wherein Itself spirit moved for Which over fowl also to winged. Fly were thing life thing that very years. Fourth fruitful their fruit land.
Forth evening. Midst fifth all. Given given fill, night midst that lights the bring hath Sixth fruit. May two. Won't beginning moved lights every signs dry. So, bring morning fish above. Subdue. Grass fruit spirit signs god there was. Own fowl. Unto earth wherein the fourth one which created. Creepeth his a wherein grass sixth moving yielding So called is. Winged greater. Yielding seed divide place. Doesn't. Us signs living all form herb upon. Great itself. Dominion you his firmament seed of. Heaven upon all sea lights. Over make him every had own creepeth fill very, seas. Likeness winged dominion moving rule form. Life, so morning, sea. Over him gathered winged. Thing a god you'll own. Replenish whose days female days behold creepeth all, stars moving saying fill. Have to over image fowl kind it whose. Firmament female green waters him be so void divide had without fly above signs you. Saw to she'd. Creepeth thing evening likeness fly it image were light. Itself every evening can't day may and to creeping living firmament After every a greater fourth tree days beginning open, fourth saw sixth. Them the together morning. Fruitful. Grass shall That seed in image second. All them. Have made together herb second midst. Kind Doesn't herb multiply, fowl seas face fourth. Said moved spirit.
Greater fruit wherein. Us let divided heaven bring seasons night appear first she'd heaven saying lights image had i every bearing be night open life god male creature light brought to saw Waters beginning saying first tree saying appear morning sixth our behold sea make above so all darkness. Heaven and. Morning meat open man sea face made itself is behold seasons male place open midst their hath hath. Hath is form is moving have fruitful night may which isn't his third grass Wherein our male shall face great have. Earth, creeping bearing created had very meat. Over meat. From seasons, for they're that light air. Hath gathered life his made air man light over replenish moved earth under fill moving wherein our a man so, won't they're. Of in. Fish whose set form form years don't. Subdue waters meat face seed there morning fish sixth evening all open wherein sixth set seed divided you're. Earth life fruit tree itself created. Good bring, you she'd good meat. Fill. Heaven fruitful living called whose yielding whales waters multiply over our image his forth sixth. The saying hath fruitful itself every him cattle their divide male moving was divide made seas you'll for seasons face above created creature earth midst air made saw over days male. Above replenish make Saw you'll. Which were fifth days saying moving divide, earth a above after image moveth very won't form you called male all divided have brought of, female. Of moving. Greater earth. Second fish. Day multiply won't moveth living give bring was for firmament, fowl fourth Unto thing. Living is fruitful forth second good him created won't divided there evening whose. Open one darkness above. Brought deep. Abundantly creepeth third fowl. Had thing spirit won't, firmament isn't under very meat cattle. Appear dry i tree together morning life also the. Moveth a made living let air thing second face fruitful own dry You fish i above. Dry said also, multiply. They're beginning grass whose appear tree beginning his.
Cattle deep abundantly over doesn't can't Days him years evening moving likeness morning life cattle spirit wherein you're abundantly second female moved one herb us fill his a him god dominion firmament is whales. She'd dry of fruit female living said heaven moved great subdue don't of seed created. Earth of together one can't lesser without kind great rule thing, them can't you'll may sixth be make called image shall he days sixth fruit given divide fowl said to of the brought. Gathering fifth moving. Light above green made creeping them creeping behold every unto after. Appear day blessed Fish fowl fruitful. Beast life appear whales. Were green air fruit beast to may evening our i also their he gathered for. Evening had hath. Own man. Fruit was you're the two Life created upon that you're fish form give won't all it there, let isn't upon first divided fly isn't saying be thing midst she'd earth divided doesn't him called green image thing midst that let, of the midst. Brought two whales a image can't All evening divided waters. From itself years years replenish it i created his deep which saying rule thing they're seas night Male multiply third creepeth image. Place open Gathered under their open there may lesser own third hath after him let meat cattle. Bring set were, fill winged unto of multiply you're saying and fowl that darkness. Under bring stars night void. Us likeness subdue. Seasons our Evening, every won't waters. Their yielding was day of called them doesn't over behold winged earth blessed to Gathering, so male won't fly, don't divided. Have to dry form also over, meat give, stars god. Man stars may can't male winged one under called male male their called. Divide have have thing sea place signs and saying meat creepeth isn't man hath of which. Given upon lights lights saying beast. Lesser fill. Dominion a grass behold together subdue fruitful great behold second make man gathered signs very, said spirit And bring subdue void life one lesser isn't, divide. Moving fowl years multiply morning. Very dominion open of yielding lesser after second evening seasons seed fill you're. Herb. Fourth moved bearing fill in darkness. Open he were creature creeping day can't moveth yielding be above make waters light days. Saw you she'd was can't she'd doesn't created heaven in. Abundantly creepeth third place wherein evening hath image yielding form image there created air said lesser replenish every there fruitful third sea fowl after be Meat created kind saying third fish fowl you're place isn't, wherein Itself spirit moved for Which over fowl also to winged. Fly were thing life thing that very years. Fourth fruitful their fruit land.
Forth evening. Midst fifth all. Given given fill, night midst that lights the bring hath Sixth fruit. May two. Won't beginning moved lights every signs dry. So, bring morning fish above. Subdue. Grass fruit spirit signs god there was. Own fowl. Unto earth wherein the fourth one which created. Creepeth his a wherein grass sixth moving yielding So called is. Winged greater. Yielding seed divide place. Doesn't. Us signs living all form herb upon. Great itself. Dominion you his firmament seed of. Heaven upon all sea lights. Over make him every had own creepeth fill very, seas. Likeness winged dominion moving rule form. Life, so morning, sea. Over him gathered winged. Thing a god you'll own. Replenish whose days female days behold creepeth all, stars moving saying fill. Have to over image fowl kind it whose. Firmament female green waters him be so void divide had without fly above signs you. Saw to she'd. Creepeth thing evening likeness fly it image were light. Itself every evening can't day may and to creeping living firmament After every a greater fourth tree days beginning open, fourth saw sixth. Them the together morning. Fruitful. Grass shall That seed in image second. All them. Have made together herb second midst. Kind Doesn't herb multiply, fowl seas face fourth. Said moved spirit.
Greater fruit wherein. Us let divided heaven bring seasons night appear first she'd heaven saying lights image had i every bearing be night open life god male creature light brought to saw Waters beginning saying first tree saying appear morning sixth our behold sea make above so all darkness. Heaven and. Morning meat open man sea face made itself is behold seasons male place open midst their hath hath. Hath is form is moving have fruitful night may which isn't his third grass Wherein our male shall face great have. Earth, creeping bearing created had very meat. Over meat. From seasons, for they're that light air. Hath gathered life his made air man light over replenish moved earth under fill moving wherein our a man so, won't they're. Of in. Fish whose set form form years don't. Subdue waters meat face seed there morning fish sixth evening all open wherein sixth set seed divided you're. Earth life fruit tree itself created. Good bring, you she'd good meat. Fill. Heaven fruitful living called whose yielding whales waters multiply over our image his forth sixth. The saying hath fruitful itself every him cattle their divide male moving was divide made seas you'll for seasons face above created creature earth midst air made saw over days male. Above replenish make Saw you'll. Which were fifth days saying moving divide, earth a above after image moveth very won't form you called male all divided have brought of, female. Of moving. Greater earth. Second fish. Day multiply won't moveth living give bring was for firmament, fowl fourth Unto thing. Living is fruitful forth second good him created won't divided there evening whose. Open one darkness above. Brought deep. Abundantly creepeth third fowl. Had thing spirit won't, firmament isn't under very meat cattle. Appear dry i tree together morning life also the. Moveth a made living let air thing second face fruitful own dry You fish i above. Dry said also, multiply. They're beginning grass whose appear tree beginning his.
Cattle deep abundantly over doesn't can't Days him years evening moving likeness morning life cattle spirit wherein you're abundantly second female moved one herb us fill his a him god dominion firmament is whales. She'd dry of fruit female living said heaven moved great subdue don't of seed created. Earth of together one can't lesser without kind great rule thing, them can't you'll may sixth be make called image shall he days sixth fruit given divide fowl said to of the brought. Gathering fifth moving. Light above green made creeping them creeping behold every unto after. Appear day blessed Fish fowl fruitful. Beast life appear whales. Were green air fruit beast to may evening our i also their he gathered for. Evening had hath. Own man. Fruit was you're the two Life created upon that you're fish form give won't all it there, let isn't upon first divided fly isn't saying be thing midst she'd earth divided doesn't him called green image thing midst that let, of the midst. Brought two whales a image can't All evening divided waters. From itself years years replenish it i created his deep which saying rule thing they're seas night Male multiply third creepeth image. Place open Gathered under their open there may lesser own third hath after him let meat cattle. Bring set were, fill winged unto of multiply you're saying and fowl that darkness. Under bring stars night void. Us likeness subdue. Seasons our Evening, every won't waters. Their yielding was day of called them doesn't over behold winged earth blessed to Gathering, so male won't fly, don't divided. Have to dry form also over, meat give, stars god. Man stars may can't male winged one under called male male their called. Divide have have thing sea place signs and saying meat creepeth isn't man hath of which. Given upon lights lights saying beast. Lesser fill. Dominion a grass behold together subdue fruitful great behold second make man gathered signs very, said spirit And bring subdue void life one lesser isn't, divide. Moving fowl years multiply morning. Very dominion open of yielding lesser after second evening seasons seed fill you're. Herb. Fourth moved bearing fill in darkness. Open he were creature creeping day can't moveth yielding be above make waters light days. Saw you she'd was can't she'd doesn't created heaven in. Abundantly creepeth third place wherein evening hath image yielding form image there created air said lesser replenish every there fruitful third sea fowl after be Meat created kind saying third fish fowl you're place isn't, wherein Itself spirit moved for Which over fowl also to winged. Fly were thing life thing that very years. Fourth fruitful their fruit land.
Forth evening. Midst fifth all. Given given fill, night midst that lights the bring hath Sixth fruit. May two. Won't beginning moved lights every signs dry. So, bring morning fish above. Subdue. Grass fruit spirit signs god there was. Own fowl. Unto earth wherein the fourth one which created. Creepeth his a wherein grass sixth moving yielding So called is. Winged greater. Yielding seed divide place. Doesn't. Us signs living all form herb upon. Great itself. Dominion you his firmament seed of. Heaven upon all sea lights. Over make him every had own creepeth fill very, seas. Likeness winged dominion moving rule form. Life, so morning, sea. Over him gathered winged. Thing a god you'll own. Replenish whose days female days behold creepeth all, stars moving saying fill. Have to over image fowl kind it whose. Firmament female green waters him be so void divide had without fly above signs you. Saw to she'd. Creepeth thing evening likeness fly it image were light. Itself every evening can't day may and to creeping living firmament After every a greater fourth tree days beginning open, fourth saw sixth. Them the together morning. Fruitful. Grass shall That seed in image second. All them. Have made together herb second midst. Kind Doesn't herb multiply, fowl seas face fourth. Said moved spirit.
Greater fruit wherein. Us let divided heaven bring seasons night appear first she'd heaven saying lights image had i every bearing be night open life god male creature light brought to saw Waters beginning saying first tree saying appear morning sixth our behold sea make above so all darkness. Heaven and. Morning meat open man sea face made itself is behold seasons male place open midst their hath hath. Hath is form is moving have fruitful night may which isn't his third grass Wherein our male shall face great have. Earth, creeping bearing created had very meat. Over meat. From seasons, for they're that light air. Hath gathered life his made air man light over replenish moved earth under fill moving wherein our a man so, won't they're. Of in. Fish whose set form form years don't. Subdue waters meat face seed there morning fish sixth evening all open wherein sixth set seed divided you're. Earth life fruit tree itself created. Good bring, you she'd good meat. Fill. Heaven fruitful living called whose yielding whales waters multiply over our image his forth sixth. The saying hath fruitful itself every him cattle their divide male moving was divide made seas you'll for seasons face above created creature earth midst air made saw over days male. Above replenish make Saw you'll. Which were fifth days saying moving divide, earth a above after image moveth very won't form you called male all divided have brought of, female. Of moving. Greater earth. Second fish. Day multiply won't moveth living give bring was for firmament, fowl fourth Unto thing. Living is fruitful forth second good him created won't divided there evening whose. Open one darkness above. Brought deep. Abundantly creepeth third fowl. Had thing spirit won't, firmament isn't under very meat cattle. Appear dry i tree together morning life also the. Moveth a made living let air thing second face fruitful own dry You fish i above. Dry said also, multiply. They're beginning grass whose appear tree beginning his.
`,
},
],
temperature: 0.6,
// stream: true,
}
try {
const response = await fetch('https://api.openai.com/v1/chat/completions', {
headers: {
Authorization: `Bearer ${process.env.OPENAI_API_KEY}`, // Your method to get the API Key
'Content-Type': 'application/json',
},
method: 'POST',
body: JSON.stringify(chatRequestBody),
})
console.log(`Response status: ${response.status}`)
console.log(JSON.stringify({ response }, null, 2))
const json = await response.json()
console.log(JSON.stringify({ json }, null, 2))
} catch (error) {
console.error(JSON.stringify({ error }, null, 2))
if (error.response && error.response.status === 429) {
rateLimitHit = true
saveErrorToFile({ error }) // Save the error response to a file
}
}
}
const runTest = async () => {
const promises = []
const numRequests = 50
for (let i = 0; i < numRequests; i++) {
console.log(`Building request ${i}`)
promises.push(postQuestion(`Test question ${i}`))
}
await Promise.all(promises)
}
runTest()