LMArenaBridge  by Lianues

Bridge to LMArena.ai models via OpenAI API

Created 2 months ago
601 stars

Top 54.4% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a high-performance bridge to access a vast array of advanced large language models hosted on LMArena.ai through any OpenAI-compatible application. It targets users who want to leverage LMArena's diverse model offerings within their existing AI chat clients, programming plugins, or other tools, offering a seamless and feature-rich experience.

How It Works

The system comprises a FastAPI backend server and a Tampermonkey browser script. The backend exposes OpenAI-compatible API endpoints, while the browser script establishes a WebSocket connection with the backend to intercept and forward requests to LMArena.ai. This architecture enables real-time streaming responses, file uploads, image generation, and automatic session ID management, all while maintaining compatibility with standard OpenAI API calls.

Quick Start & Requirements

  • Install Python dependencies: pip install -r requirements.txt
  • Install Tampermonkey browser extension.
  • Run the server: python api_server.py
  • Obtain and configure session IDs using python id_updater.py and the provided Tampermonkey script.
  • Requires a Python environment and a browser with Tampermonkey.

Highlighted Details

  • High-performance FastAPI backend with WebSocket communication.
  • Full OpenAI v1 compatibility for chat completions, models, and image generation.
  • Supports universal file uploads (Base64 encoded) and real-time streaming responses.
  • Automatic model list and program updates.
  • Advanced configuration for model-specific session IDs and modes (battle/direct_chat).
  • "Tavern Mode" for SillyTavern compatibility and a "Bypass Mode" for potential censorship evasion.

Maintenance & Community

The project is maintained by Lianues. Links to community resources such as Discord/Slack are not explicitly provided in the README.

Licensing & Compatibility

The project's license is not explicitly stated in the README. Compatibility for commercial use or closed-source linking would depend on the specific license chosen by the maintainers.

Limitations & Caveats

The README notes that only the last connected browser tab's Tampermonkey script will be active if multiple LMArena pages are open. Some newer models might require specific handling or usage within the "Battle" mode for session ID capture.

Health Check
Last Commit

3 days ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
23
Star History
265 stars in the last 30 days

Explore Similar Projects

Starred by Patrick von Platen Patrick von Platen(Author of Hugging Face Diffusers; Research Engineer at Mistral) and Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera).

client-python by mistralai

0.6%
648
Python SDK for Mistral AI platform
Created 1 year ago
Updated 2 weeks ago
Feedback? Help us improve.