Recently Browsing 0
- No registered users viewing this page.
Latest Updated Files
-
Zoro - Automated Anime Streaming Platform
Zoro - Automated Anime Streaming Platform
499.00 EUR
- 0 Purchases
- 2 Comments
-
SayHi Social- (Timeline, chat, Live,Instagram,Reels,Facebook,Twitter,Threads, TikTok),
- 353 Downloads
- 3 Comments
-
VlogLab - Online Vlogging Platform
- 10 Downloads
- 0 Comments
-
Fixed TOC - table of contents for WordPress(wp) plugin
- 1 Downloads
- 0 Comments
-
Random Image Generator Website PHP Script
- 13 Downloads
- 0 Comments
-
CloudOffice - Multipurpose Office Suite on the Cloud
- 18 Downloads
- 0 Comments
-
Madara – Responsive and modern WordPress theme for manga sites
- 680 Downloads
- 5 Comments
-
Max Addons Pro for Bricks Builder
- 1 Downloads
- 0 Comments
-
External Importer Pro By KeywordRush
- 0 Downloads
- 0 Comments
-
SureMembers - Sell and Grow your Membership Site with Ease
- 0 Downloads
- 0 Comments
-
PublishPress Revisions Pro
- 1 Downloads
- 0 Comments
-
Ultimate Member MailChimp Addon
- 1 Downloads
- 0 Comments
-
Fixed TOC - table of contents for WordPress(wp) plugin
- 0 Downloads
- 0 Comments
-
ChatPion add on Google Sheet Integration & HTTP API Integration
- 8 Downloads
- 0 Comments
-
Car2Go - One Stop Ride Share Platform | User Web App | Driver Web App | Admin Panel (MERN)
- 3 Downloads
- 0 Comments
-
Chrome Extension for Premium URL Shortener - Link Shortener, Bio Pages & QR Codes
- 17 Downloads
- 1 Comments
-
AiGen - All-in-One AI Generation Tool - Artificial Intelligence
- 12 Downloads
- 0 Comments
-
Accounting and Bookkeeping for Perfex CRM
- 7 Downloads
- 0 Comments
-
Smart TMS SaaS - Tailor Management System
- 7 Downloads
- 0 Comments
-
Tradexpro Exchange - Crypto Buy Sell and Trading platform, ERC20 and BEP20 Tokens Supported
- 1,107 Downloads
- 15 Comments
View File
GPT-3 Starter Kit for Laravel
ChatGPT Starter Kit for PHP Laravel
This starter kit using PHP Laravel and the OpenAI API.
Like ChatGPT (chat.openai.com/), you can chat with this starter kit in a dialog. It's a workaround I've come up with to provide context to the GPT-3 engine.
Technical Stack
I am using the following technologies for this starter template:
You initially start with a brand new Laravel application and add the Laravel Breeze starter kit.
While developing this starter kit, I isolated the code and all necessary components under the GPT folder. This applies to the backend code where you find everything under the app\Gpt folder. Or the front-end code where I've added the resources/js/Pages/Gpt.vue page and resources/js/Components/Gpt folder. Finally, for tests, I've added the tests/Feature/Gpt folder to test the functionality of the starter kit.
To run this application, grab your own OpenAI API Key and place it in the .env file:
OPENAI_API_KEY=
Next, install the backend components using the following command:
composer install
Then lastly, run the following two commands to run the application:
npm install && run dev
The starter kit also supports running over a Docker container using the official Laravel Sail package. Therefore, you can run it using docker sail with these commands:
You can also use yarn instead of npm.
Check the official documentation for Laravel Sail for more information.
Functioning
When the GPT Index page loads for the first time, it performs a GET request to the OpenAI API to retrieve all saved models. Those models appear on the left-sidebar of the starter kit to allow the user to select an OpenAI model or engine.
On the GPT Index page, I've set the default model to be text-davinci-003. This is by far the most popular model and you are free to change it.
The user can also play with the Temperature of the completions. The lower the value of the temperature, the more accurate and straightforward the answer will be.
Finally, the user can change the Maximum Length or tokens, generally between 0 and 4000.
When a user enters a new prompt, a new POST request is sent to the server and passes over the following fields:
The server, by turn, issues a completion request to the OpenAI API to generate a response.
The response text is then displayed to the user as a reply coming from the OpenAI API.
Preserving the Context
Something that I noticed in the OpenAI API, is preserving the context from one prompt to another was absent.
If you try the official chat.openai.com/ website, you notice the context is preserved. For instance, you prompt the chatbot to list five recipes that include Shrimp. In the next prompt, you ask the chatbot to list the ingredients of the second option. Notice that you don't specify the recipe's name in the second option. This is because the ChatGPT chatbot preserves the context and remembers your previous prompt or discussion.
Therefore, this feature is part of the ChatGPT chatbot rather than the OpenAI API.
I found a way to pass context to the model in this starter kit. Hence, using this starter kit, you will have a managed context. The model will remember the original discussion for every new prompt you send. I won't uncover what I did; you can see it when you download your copy of this starter kit
Support is available for paid files only
Support for free files is offered for a fee only
Featured Replies
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.