This app uses OpenAI to summarize a block of text and then posts the result to Slack.
To get started with this project follow the instructions on the GitHub README page (~5 mins).
- Uses Next.js experimental
- Uses both our OpenAI and Slack integrations
- Uses React hooks to show the live status of the Job in the UI
Using Next.js Server Actions
This project uses Next.js Server Actions to handle the form submission. The feature is currently experimental but can be enabled in your
next.config.js file using the
Here we are using the
sendText action to handle the form submission. This action is defined in the
Using our OpenAI and Slack integrations
The Job code itself is very simple. It uses an
eventTrigger which is triggered by the
summarize.text event. The text is then summarized using our OpenAI integration (ChatGPT-3.5 in this case), and then posted to a specific Slack channel using our Slack integration.
Using React hooks to show the live status of the Job in the UI
Another cool feature of this project is that it uses React hooks to show the live status of the Job using the
useEventRunDetails hook from the
This is a simple example of how you can use the hook to show the job status, but of course this can be adapted for different use cases depending on the job.
Get started with this project
You can get started with this project in minutes. Simply follow the instructions on the GitHub README page.