Download the PHP package sgraaf/openai-php without Composer

On this page you can find all versions of the php package sgraaf/openai-php. 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-php

OpenAI PHP

Packagist Version Packagist PHP Version pre-commit.ci status

A thin PHP wrapper for the OpenAI API built upon libcurl.

Installation

You can install OpenAI PHP via Composer:

Usage

Models

List models

Lists the currently available models, and provides basic information about each one such as the owner and availability. See the OpenAI docs for more information.

Retrieve model

Retrieves a model instance, providing basic information about the model such as the owner and permissioning. See the OpenAI docs for more information.

Completions

Create completion

Creates a completion for the provided prompt and parameters. See the OpenAI docs for more information.

Chat

Create chat completion

Creates a completion for the chat message. See the OpenAI docs for more information.

Edits

Create edit

Creates a new edit for the provided input, instruction, and parameters. See the OpenAI docs for more information.

Images

Create image

Creates an image given a prompt. See the OpenAI docs for more information.

Create image edit

Creates an edited or extended image given an original image and a prompt. See the OpenAI docs for more information.

Create image variation

Creates a variation of a given image. See the OpenAI docs for more information.

Embeddings

Create embeddings

Creates an embedding vector representing the input text. See the OpenAI docs for more information.

Audio

Create transcription

Transcribes audio into the input language. See the OpenAI docs for more information.

Create translation

Translates audio into English. See the OpenAI docs for more information.

Files

List files

Returns a list of files that belong to the user's organization. See the OpenAI docs for more information.

Upload file

Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact OpenAI if you need to increase the storage limit. See the OpenAI docs for more information.

Delete file

Delete a file. See the OpenAI docs for more information.

Retrieve file

Returns information about a specific file. See the OpenAI docs for more information.

Retrieve file content

Returns the contents of the specified file. See the OpenAI docs for more information.

Fine-Tunes

Create fine-tune

Creates a job that fine-tunes a specified model from a given dataset.

Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete.

See the OpenAI docs for more information.

List fine-tunes

List your organization's fine-tuning jobs. See the OpenAI docs for more information.

Retrieve fine-tune

Gets info about the fine-tune job. See the OpenAI docs for more information.

Cancel fine-tune

Immediately cancel a fine-tune job. See the OpenAI docs for more information.

List fine-tune events

Get fine-grained status updates for a fine-tune job. See the OpenAI docs for more information.

Delete fine-tune model

Delete a fine-tuned model. You must have the Owner role in your organization. See the OpenAI docs for more information.

Moderations

Create moderation

Classifies if text violates OpenAI's Content Policy. See the OpenAI docs for more information.


All versions of openai-php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0.0
ext-curl Version *
ext-json Version *
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 sgraaf/openai-php contains the following files

Loading the files please wait ....