skip to Main Content

Why I can`t find Class "OpenAIAPIRequest"? – PHP

I use openai/client-php. require __DIR__ . '/vendor/autoload.php'; use OpenAIClient; use OpenAIAPIRequest; $yourApiKey = 'sk-fEpZ.......'; $client = new Client(new Request($yourApiKey)); function generateText($client, $model, $prompt, $length, $temperature = 0.5) { $response = $client->completions()->create( $model, [ 'prompt' => $prompt, 'max_tokens' => $length, 'temperature'…

VIEW QUESTION
Back To Top
Search