OpenAI released a https://platform.openai.com/docs/guides/chat/introduction that allows you to make use of the powerful AI model that also powers ChatGPT. Let's see how we can make use of it and build a ChatGPT clone using Laravel 10.

The new AI model is called gpt-3.5-turbo and is 10 times (!) cheaper than the most powerful DaVinci model, which is amazing.

$response = OpenAI::chat()->create([ 'model' => 'gpt-3.5-turbo', 'messages' => $messages ]); This will give us the OpenAI chat response, which we also want to add to our messages array.

And that's all you need to do, thanks to the new OpenAI Chat completions API to build a ChatGPT clone yourself.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners