Laravel OpenAI examples
Created:
Updated:
Categories: Projects
Author: Tobias Schottstädt
This repository shows how to use OpenAI features with Laravel 10, Tailwind, OpenAI-PHP and Laravel Prompts. It provides examples of text generation, audio generation, image generation and enhancement, and chatbot interactions.
Programming languages
- PHP: A server-side scripting language that is mainly used for web development. Here it is used to implement the logic and functionality of the Laravel application.
Blade (Laravel): Laravel's templating engine, which makes it possible to embed PHP code in HTML templates. It is used for the presentation of the user interface.
- JavaScript: A programming language that is mainly used to create interactive web content. Here it is used in combination with Tailwind CSS for dynamic and responsive front-end functions.
Tailwind CSS: A utility-first CSS framework that allows you to quickly create custom designs without having to write a lot of CSS yourself.
README content
The repository offers various examples of what you can do with OpenAI and Laravel, including:
- Generating poems
- Audio generation (pranks)
- Image generation and enhancement
- Chatbot interactions
Use of the repository
- Clone repository: git clone https://github.com/xchimx/Laravel-OpenAI-Examples.git
- Install dependencies: composer install
- Set environment variables: cp .env.example .env and php artisan key:generate
- Configure the API key: Add OpenAI API key to .env file.
- Install and compile assets: npm install and npm run build
- Create storage link: php artisan storage:link
More information
For more detailed information and the complete source code visit the repository.
Author
Hey 👋 my name is Tobias Schottstädt and I am a full-stack developer from Kassel, Germany. As a ki specialist from Kassel I may be able to support you in your project. Planning a project or looking to modernise your existing website? Take a look at my services or drop me a line – I look forward to hearing from you! About me | Contact
I build custom websites and web applications with PHP and JavaScript – with Laravel, Livewire and Vue.js at the heart of my stack. From a well-designed backend to a clean, responsive frontend and technical SEO, you get everything from a single source. What drives me: software that not only works today, but is still a joy to maintain five years from now.