Skip to content

Laravel API example that uses the Laravel OpenAI API package to easily deploy a ChatGPT API

Notifications You must be signed in to change notification settings

supuna97/laravel-chat-gpt-api

 
 

Repository files navigation

About This Repo

I really like AI and ChatGPT has blown my mind. I decided to create a Laravel API that uses ChatGPT to easily integrate in other applications! See the blog at my blog

Usage

This Laravel tutorial application is powered by the [Laravel OpenAI API] (https://github.com/mastashake08/laravel-openai-api) package created by yours truly and can be found here. This package simply requires the package and exposes the API from the package. Simply spin up the instance, run composer, set the .env file and hit the URL.

composer install
POST /api/generate-result  $data - a JSON object containing OpenAI configuration
e.g.
{
  "model": "text-davinci-003",
   "prompt" : "Write a wordpress post excerpt summarizing ChatGPT",
  "temperature": 0.9,
  "max_tokens": 20
}  

Consider Sponsoring

Help me maintain this project, please consider looking at the FUNDING file for more info.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Laravel API example that uses the Laravel OpenAI API package to easily deploy a ChatGPT API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vue 49.9%
  • PHP 45.4%
  • Dockerfile 3.2%
  • JavaScript 0.6%
  • Blade 0.5%
  • Shell 0.4%