Simple project using nlw-ai-mastery by @rocketseat as base.
It's a fullstack app using NextJS 13.4, Postgresql, and Prisma to give users the ability to upload a .mp4 video, add topics, add/select/edit a prompt template, select temperature, and send a request to OpenAI API to get back a response based on the video transcription + sent prompt. In this project we have the use case of a user requesting OpenAI to generate a title and a description for an YouTube video based on the uploaded video content.
This project uses:
- WebAssembly (FFMPEG) to convert the video to audio
- OpenAI whisper to transcript the audio to text
- OpenAI chat to generate suggestions
- ShadcnUI to create UI elements
- Docker to manage the environment containers
- pnpm to manage modules
First, run the development server:
Create a .env file
touch .env
Create a tmp folder under public
directory:
cd public && mkdir tmp
Edit it with your data as the following
# DATABASE
DATABASE_URL=""
POSTGRES_USER=
POSTGRES_PASSWORD=
POSTGRES_DB=
# OPENAI
OPENAI_API_KEY=
Install dependencies
pnpm install
Run docker compose
docker-compose up --build
If everything works correctly, the app should be available at http://localhost:3333
- Currently, prisma seed is not working properly
- Clean unused/unnecessary code
- We could use server actions
- Add more validations and UI improvements
- Use langchain
- Implement Llama2