I tried to switch from Davinci to Instruct-Davinci (text-davinci-001), but I couldn’t get it to work with CURL/PHP…
$ch = curl_init();
$mymodel = "text-davinci-001";
$payload = array( "prompt"=> $myprompt, "max_tokens"=> 250,"temperature"=> $temp, "model"=> $mymodel, "top_p"=> $top_p, "n"=> 1, "presence_penalty" => $pres,"frequency_penalty"=> $freq, "stream"=> false, "logprobs"=> null, "stop"=> "<|endoftext|>");
[SNIP]
curl_setopt($ch, CURLOPT_URL, "https://api.openai.com/v1/engines/davinci/completions");
That’s what I had before, I’ve tried various things for the CURLOPT_URL, but it would never process.
I’ve also tried…
curl_setopt($ch, CURLOPT_URL, "https://api.openai.com/v1/completions");
with both these new models…
$mymodel = "text-davinci-001";
$mymodel = "text-davinci-002";
I know I’m missing something small/stupid. Any help appreciated!