MeloGenAI: Generating a 🌈Rainbow Playlist πŸ³β€πŸŒˆ for ChatGPT and YouTube Music

austincoleman

Austin Coleman

Posted on June 2, 2023

MeloGenAI: Generating a 🌈Rainbow Playlist πŸ³β€πŸŒˆ for ChatGPT and YouTube Music

Hello and happy pride month! 🌈

I am thrilled to introduce to the Dev.to community MeloGenAI, an open source playlist generator plugin that I've developed for both ChatGPT and YouTube Music.

🎢 What is MeloGenAI?

MeloGenAI is a playlist generator plugin for ChatGPT. Given a playlist title, a list of songs, and a privacy setting for the playlist, it will return a URL to a YouTube Music playlist. That way if you generate a playlist with ChatGPT, you don't have to manually copy and paste the songs to get a playlist. It automates that process.

🌈 A Rainbow-Themed Playlist

For a quick demonstration, I used MeloGenAI to ask ChatGPT to generate a rainbow-themed playlist in honor of pride month. Check out the process and results in this YouTube video I made:

MeloGenAI Rainbow Playlist

Here is the Colors of the Rainbow playlist it generated.

πŸ’» How does it work?

MeloGenAI is a JavaScript API deployed using Vercel serverless functions. The process of working with ChatGPT plugins involves writing an endpoint, providing a description of the endpoint, and then ChatGPT uses that description to call your endpoint. For example, here is the openapi.yaml file for MeloGenAI. It describes one simple endpoint called /playlist which generates a playlist given a name, list of songs, and a privacy setting for the playlist. My API makes calls to YouTube's API to create a playlist, add songs to the playlist, and return the playlist URL for YouTube Music.

πŸ•΅οΈβ€β™€οΈ The fine details

If you'd like to know some of the finer implementation details, I have mocked the YouTube Service using Jest in my tests for it. The tests mock my YouTubeService.js script, which is a wrapper around the YouTube API. The tests also contain Schema Validations to verify my openapi.yaml spec matches the mocks. playlist.js is the main playlist generation endpoint code, while YouTubeService.js is a wrapper script I wrote for the YouTube Data API. If you'd like to contribute or collaborate, feel free to email me at austin@melogenai.dev

πŸš€ The Future of MeloGenAI

At present, the plugin is still in its development phase and not yet publicly available. However, I am currently in the process of obtaining necessary approvals from both YouTube and OpenAI. The most challenging part of the process has been ensuring that the auth flow aligns with what OpenAI and YouTube expect, as well as adhering to their policies. I have been diligently working to ensure compliance.

Once approved, I hope for MeloGenAI to be accessible to all. I'll make sure to keep you all updated on the progress.

πŸ’– Thank You

I'm incredibly excited about this project and the potential it has to bring even more joy to music lovers. I've been using it and have been loving it. I hope to share it with you all soon too. I appreciate your interest and support.

Please note that I am an independent developer, and this project is not officially affiliated with nor endorsed by OpenAI or YouTube.

Here's to a bright future filled with even more personalized playlists! Thanks, and happy pride month. πŸ³β€πŸŒˆ

πŸ’– πŸ’ͺ πŸ™… 🚩
austincoleman
Austin Coleman

Posted on June 2, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related