Dim j As HttpJob
j.Initialize("",Me)
Dim body As String = $"{\"model\":\"text-davinci-003\",\"prompt\":\"What is the capital of France?\",\"temperature\":0.0,\"max_tokens\":150}""$
Dim url As String = "https://api.openai.com/v1/completions"
j.PostString(url,body)
j.GetRequest.SetContentType("application/json")
j.GetRequest.SetHeader("authorization","Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
j.GetRequest.InitializePost2(url, body.GetBytes("UTF8"))
wait for (j) done (j As HttpJob)
If j.Success Then
Dim responseString As String = j.Response.GetString
Log(responseString)
End If