Skip to content

Latest commit

 

History

History

examples

OpenAI PHP Client Examples

Welcome to the collection of practical examples showcasing the usage of the OpenAI PHP Client.

Getting Started

To run the examples provided in this repository, follow the steps below:

Clone the Repository

Start by cloning the repository to your local machine:

git clone https://github.com/thojou/openai-php-client.git
cd openai-php-client

Install Dependencies

Navigate to the repository folder and install the necessary dependencies using Composer:

composer install

Running Examples

Once you have cloned the repository and installed the dependencies, you can execute the examples using the following command:

php examples/<example>.php "<YOUR API KEY>"

Replace <example> with the name of the example script you want to run and "<YOUR API KEY>" with your actual OpenAI API key.

Explore and experiment with these examples to gain insights into effectively utilizing the OpenAI PHP Client.

Feel free to reach out if you encounter any questions or issues during the process. Happy coding!