rsrohan99/ai-diagram-generator
About
A cool AI Diagram generator from a given topic, that streams the partial diagrams from the incomplete JSONs during generation. Built using LlamaIndex, Vercel AI SDK.
Design & MediaMeasured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalIn this tutorial, we'll see how to use LlamaIndex Pydantic Program mode and partial object parsing to send intermediate pydantic objects from incomplete JSONs to the frontend for an intuitive user experience.
Full video tutorial under 2.5 minutes below 👇 🔥🔥
We use LlamaIndex Pydantic Program mode for structured output generation and we use partial object parsing to send intermediate objects that are validated using Pydantic models to the frontend.
Click the above thumbnail for the detailed video tutorial.
Getting Started
First clone the repo:
git clone https://github.com/rsrohan99/ai-diagram-generator.git
cd ai-diagram-generator
Start the Backend
cd into the backend directory
cd backend
First create .env from .env.example
cp .env.example .env
Set the OpenAI key in .env
OPENAI_API_KEY=****
Install the dependencies
poetry install
Start the backend server
poetry run python main.py
Start the Frontend
cd into the frontend directory
cd frontend
First create .env from .env.example
cp .env.example .env
Install the dependencies
npm i
Start the frontend server
npm run dev
Explore related projects
Loading…
