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

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners