Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bhaidar/laravel-server-sent-events
A Laravel application to demonstrate using Server-Sent Events with the OpenAI Chat Streaming API
https://github.com/bhaidar/laravel-server-sent-events
Last synced: 28 days ago
JSON representation
A Laravel application to demonstrate using Server-Sent Events with the OpenAI Chat Streaming API
- Host: GitHub
- URL: https://github.com/bhaidar/laravel-server-sent-events
- Owner: bhaidar
- Created: 2023-08-22T12:37:00.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-22T12:50:57.000Z (over 1 year ago)
- Last Synced: 2023-08-22T16:23:19.117Z (over 1 year ago)
- Language: PHP
- Size: 129 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Server-Sent Events Integration in Laravel Application
This repository showcases the utilization of server-sent events within a Laravel application, emphasizing the seamless integration of the OpenAI API for real-time chat streaming.
## Project Overview
The focal point of this project is the development of a streamlined chat interface, harmonizing the dynamic interaction between users and the OpenAI API through the utilization of server-sent events. The application's core functionality revolves around users posing inquiries, to which OpenAI furnishes responses. This exchange of information is achieved through the continuous streaming of responses, employing the server-sent events capability.
## Local Deployment
To experience this application firsthand on your local machine, you can follow these steps:
1. **Clone Repository**: Begin by cloning this repository to your local environment.
2. **Install Dependencies**: Utilize the `composer` package manager to install all essential PHP dependencies.
3. **Local Environment Setup**: With the aid of Laravel Sail, this application can be readily set up and executed locally. Ensure that Docker is installed on your system. Then, proceed with the subsequent commands:
```
sail up -d
sail npm install
sail npm run dev
```## Disclaimer
It's important to note that this application exclusively serves as a demonstration, thereby rendering it unsuitable for deployment in a production environment.
## Contact Information
Should you be interested in further exploring similar projects for potential production applications, feel free to get in touch with me at: [email protected].
We hope you find this demonstration both informative and insightful. Thank you for your interest and exploration!