Download the PHP package yllw-digital/laravel-chatgpt-mock-api without Composer
On this page you can find all versions of the php package yllw-digital/laravel-chatgpt-mock-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yllw-digital/laravel-chatgpt-mock-api
More information about yllw-digital/laravel-chatgpt-mock-api
Files in yllw-digital/laravel-chatgpt-mock-api
Package laravel-chatgpt-mock-api
Short Description Generate smart API mocks in Laravel using ChatGPT prompts
License MIT
Homepage https://github.com/yllw-digital/laravel-chatgpt-mock-api
Informations about the package laravel-chatgpt-mock-api
Laravel ChatGPT Mock API Generator
Generate smart API mocks in Laravel using ChatGPT prompts.
Installation
You'll need to then publish the config file and migrations:
Run migrate to create the cache table:
Finally you'll need to add your OpenAI API key to your .env
file:
Usage
In your routes/api.php
file, add the following:
This will generate a response like the following:
Caching
By default, the package will cache the generated responses in your DB so that you don't hit the OpenAI API limit. You can disable this by setting like so:
Changing ChatGPT model
By default, the package will use the gpt-3.5-turbo
model. You can change this by setting like so:
License
This package is open-sourced software licensed under the MIT license.
Credits
All versions of laravel-chatgpt-mock-api with dependencies
spatie/laravel-package-tools Version ^1.14.0
illuminate/contracts Version ^10.0