ReflectionAnyLLM  by antibitcoin

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

Created 1 year ago
322 stars

Top 84.3% 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

11 months ago

Responsiveness

Inactive

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

Explore Similar Projects

Feedback? Help us improve.