ReflectionAnyLLM  by antibitcoin

Basic chain-of-thought reasoning demo with any LLM supporting OpenAI-compatible API

created 10 months ago
321 stars

Top 85.7% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a lightweight, proof-of-concept PHP web application for demonstrating basic chain-of-thought (CoT) reasoning with any Large Language Model (LLM) supporting an OpenAI-compatible API. It's designed for developers and researchers looking to quickly experiment with CoT capabilities across various local or remote LLM providers without complex setup.

How It Works

ReflectionAnyLLM uses a PHP backend (chat.php) to interact with LLMs via their OpenAI-compatible API endpoints. It dynamically generates reasoning steps, allowing the LLM to break down problems. A summary of the thought process is displayed by default, with an option to view the full details. The application maintains a history of the last 30 messages for context.

Quick Start & Requirements

  • Install: Clone the repository and place index.html and chat.php into your web server's public directory (e.g., XAMPP's htdocs/).
  • Prerequisites: A web server (XAMPP, MAMP, LAMP) with PHP and the curl extension enabled.
  • Setup: Configure API endpoint and key in chat.php. Access via http://localhost/ or your domain.
  • Demo: freemindgpt.com/reflectionanyllm (uses Gemini-pro-1.5 on OpenRouter free tier).

Highlighted Details

  • Supports any OpenAI-compatible LLM API (LM Studio, Groq, OpenRouter, OpenAI).
  • Implements dynamic, LLM-generated reasoning steps (up to 10, configurable).
  • Solves simple reasoning tasks like the "strawberry count" problem on models >8B parameters.
  • Allows downloading chat history as JSON.

Maintenance & Community

The project is a prototype, open for community contributions via pull requests. Feedback and suggestions are welcomed.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: Permissive for commercial use and closed-source linking, requiring attribution.

Limitations & Caveats

This project is explicitly labeled a prototype and is not secured for production environments. The backend code lacks robust security practices. While functional for basic demonstrations, performance and advanced reasoning depend heavily on the chosen LLM.

Health Check
Last commit

10 months ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
2 stars in the last 90 days

Explore Similar Projects

Starred by Jared Palmer Jared Palmer(Ex-VP of AI at Vercel; Founder of Turborepo; Author of Formik, TSDX), Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), and
1 more.

promptable by cfortuner

0%
2k
TS/JS library for building full-stack AI apps
created 2 years ago
updated 2 years ago
Feedback? Help us improve.