Download the PHP package dneustadt/openai-client without Composer

On this page you can find all versions of the php package dneustadt/openai-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package openai-client

OpenAI PHP Client

OpenAI is an AI research and deployment company. Our mission is to ensure that artificial general intelligence benefits all of humanity.

Installation & Usage

Requirements

PHP 7.2 and later.

Composer

To install via Composer:

composer require dneustadt/openai-client

Getting Started

Please follow the installation procedure and then run the following:

API Endpoints

All URIs are relative to https://api.openai.com/v1

Class Method HTTP request Description
AnswerApi postAnswer POST /answers Answers the specified question using the provided documents and examples.
ClassificationApi postClassification POST /classifications The endpoint first searches over the labeled examples to select the ones most relevant for the particular query. Then, the relevant examples are combined with the query to construct a prompt to produce the final label via the completions endpoint.
CompletionsApi postCompletions POST /engines/{engine_id}/completions Creates a new completion for the provided prompt and parameters
EmbeddingsApi postEmbeddings POST /embeddings Creates an embedding vector representing the input text.
EnginesApi getEngineById GET /engines/{engine_id} Retrieves an engine instance, providing basic information about the engine such as the owner and availability.
EnginesApi getEngines GET /engines Lists the currently available engines, and provides basic information about each one such as the owner and availability.
FilesApi deleteFile DELETE /files/{file_id} Delete a file.
FilesApi getFileById GET /files/{file_id} Returns information about a specific file.
FilesApi getFiles GET /files Returns a list of files that belong to the user's organization.
FilesApi postFile POST /files Upload a file that contains document(s) to be used across various endpoints/features.
FineTunesApi getFineTune GET /fine-tunes/{fine_tune_id} Gets info about the fine-tune job.
FineTunesApi getFineTuneEvents GET /fine-tunes/{fine_tune_id}/events Get fine-grained status updates for a fine-tune job.
FineTunesApi getFineTunes GET /fine-tunes List your organization's fine-tuning jobs
FineTunesApi postFineTuneCancel POST /fine-tunes/{fine_tune_id}/cancel Immediately cancel a fine-tune job.
FineTunesApi postFineTunes POST /fine-tunes Creates a job that fine-tunes a specified model from a given dataset.
ImagesApi postImagesEdits POST /images/edits Creates an edited or extended image given an original image and a prompt.
ImagesApi postImagesGenerations POST /images/generations Given a prompt and/or an input image, the model will generate a new image.
ImagesApi postImagesVariations POST /images/variations Creates a variation of a given image.
ModelsApi deleteModel DELETE /models/{model} Delete a fine-tuned model. You must have the Owner role in your organization.
ModelsApi getModel GET /models/{model} Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
ModelsApi getModels GET /models Lists the currently available models, and provides basic information about each one such as the owner and availability.
ModerationsApi postModerations POST /moderations Classifies if text violates OpenAI's Content Policy
SearchApi postSearch POST /search The search endpoint computes similarity scores between provided query and documents. Documents can be passed directly to the API if there are no more than 200 of them.

Models

Request Payloads

Response Models


All versions of openai-client with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
ext-curl Version *
ext-json Version *
ext-mbstring Version *
guzzlehttp/guzzle Version ^6.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dneustadt/openai-client contains the following files

Loading the files please wait ....