Skip to content

glassBead-tc/audius-langchain-integration

Repository files navigation

Langchain x Audius API/SDK

(a public service brought to you by TRICK CHENEY.)

Hadn't seen an AI integration template for Audius yet, so here we are. I started building out a chatbot to demonstrate that the integration works, and the chatbot has become a larger-scale undertaking that I'll be working on for the Amplify Hackathon (09/23 - 09/30) separately from this repo, but I thought the community might appreciate a jumping-off point for building other apps with Langchain that involve the Audius API or SDK.

Some notes

There's a lot of unused/context-impertinent code from the Langchain x Next.js Starter Template from the folks at Langchain (a template I drew from liberally: much thanks!!), as well as half-built support for similarity searches via Supabase. I'm open-sourcing the integration now and tidying up later in the interest of adhering to the hackathon rules, competitive spirit and all that.

The chatbot in this repo is not good: you can ask it how many plays a certain song by a certain artist has, and you can perform essential ranking-based queries (i.e. "What is Deadmau5's most popular track on Audius?"), but beyond that it's very incomplete: what I hope this repo can do for other Audius devs is eliminate a few days of troubleshooting and refactoring if you're trying to get off the ground with a Langchain x Audius application.

🚀 Getting Started

First, clone this repo and download it locally.

Next, you'll need to set up environment variables in your repo's .env.local file. Copy the .env.example file to .env.local. To start with the basic examples, you'll just need to add your OpenAI API key.

Next, install the required packages using your preferred package manager (e.g. npm).

Now you're ready to run the development server:

npm run dev

Open http://localhost:3000 with your browser to see the result! Ask the bot how many plays one of your tracks has, or what your favorite artist's most-played song is on the platform.

About

Langchain x Audius API/SDK integration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages