Skip to content

Conversation

@lakshyaag
Copy link
Contributor

@lakshyaag lakshyaag commented Jan 5, 2026

Adds an interactive playground with live streaming of results

- 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.
@alexzhang13
Copy link
Owner

@lakshyaag Feel free to send screenshots of what it looks like over time! We can make this somewhat iterative of a process.

@lakshyaag
Copy link
Contributor Author

Will do once I'm back on my personal machine

@lakshyaag
Copy link
Contributor Author

playground-form-top-half playground-form-bottom-half

Here's how it looks like right now. I'm seeing if real-time visualization of the JSONL that's being logged can be shown.

- 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 lakshyaag marked this pull request as ready for review January 6, 2026 04:00
@alexzhang13
Copy link
Owner

@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!

@lakshyaag
Copy link
Contributor Author

lakshyaag commented Jan 6, 2026

@alexzhang13 Here's a small demo:

2026-01-06.17-05-43.mp4

I've added a README.md and support for passing backend_kwargs dict. What additional clients were you thinking of supporting?

- 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.
@alexzhang13
Copy link
Owner

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!

@alexzhang13 alexzhang13 self-requested a review January 7, 2026 19:52
@lakshyaag
Copy link
Contributor Author

Any comments or things to fix on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants