feat: add interactive playground for running new queries#16
feat: add interactive playground for running new queries#16lakshyaag wants to merge 11 commits intoalexzhang13:mainfrom
Conversation
- Added FastAPI server for RLM playground, enabling web-based completions. - Introduced Pydantic models for API requests and responses. - Updated `pyproject.toml` to include new dependencies: FastAPI, Uvicorn, and others. - Modified example quickstart to use the new FastAPI environment. - Created a user interface for the playground with React components for form submission and result display. - Implemented CORS middleware for API accessibility from different origins.
- Added `custom_system_prompt` and `verbose` fields to `RunRequest` model for enhanced configuration. - Implemented verbose output capturing in the `run_rlm` function, allowing detailed console output to be returned in `RunResponse`. - Introduced `KeyValueEditor` component for dynamic key-value pair management in the frontend. - Updated `PlaygroundForm` to support custom system prompts, environment kwargs, and other backends with their respective configurations. - Enhanced `PlaygroundResults` to display verbose output if available, improving user feedback on execution details.
5ff63bd to
702f701
Compare
|
@lakshyaag Feel free to send screenshots of what it looks like over time! We can make this somewhat iterative of a process. |
|
Will do once I'm back on my personal machine |
28ec108 to
c4aa742
Compare
- Added `StreamEvent` model for handling streaming events. - Introduced `/api/run/stream` endpoint for real-time execution updates via Server-Sent Events. - Enhanced `RLMLogger` to support logging callbacks for real-time logging during execution. - Created `LiveLogViewer` component for displaying live execution logs and results in the UI. - Updated `PlaygroundForm` to initiate streaming runs and handle new configurations. - Refactored existing components to accommodate the new streaming functionality and improve user experience.
|
@lakshyaag This is very cool, just so I understand, in this setup you can prompt in the playground, and then it will spit out a result as well? So this is not just a visualizer? If that's the case, let's also add some support for specifying all the different types of clients / inserting API keys as needed. Super cool! |
|
@alexzhang13 Here's a small demo: 2026-01-06.17-05-43.mp4I've added a README.md and support for passing |
- Changed default value of `enable_logging` in `RunRequest` from `False` to `True`. - Updated `PlaygroundForm` to set `enable_logging` to `true` directly, removing the local state management for logging.
|
Sick :) @lakshyaag I'll merge this soon if nothing else is needed, I need to find some time to test it out myself though. Thanks! |
|
Any comments or things to fix on this? |


Adds an interactive playground with live streaming of results