Skip to content

Latest commit

 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openai-php

This SDK is managed by the SDK Fabric project, a global infrastructure to automatically generate SDKs for every API.

You can find more information about this SDK at TypeHub: https://app.typehub.cloud/d/sdkfabric/openai

Usage

<?php

require __DIR__ . '/vendor/autoload.php';

$client = new \SdkFabric\Openai\Client::build('[access_token]');

// Creates a model response for the given chat conversation.
$response = $client->completions()->create(new CompletionRequest());

// Delete a stored chat completion.
$response = $client->completions()->delete('completion_id');

// List stored Chat Completions.
$response = $client->completions()->getall('after', 1, 'model', 'order');

// Creates a model response.
$response = $client->responses()->create(new ResponseRequest());

About

Openai PHP SDK managed by SDK Fabric

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages