LLPhant  by LLPhant

PHP framework for generative AI, inspired by Langchain

Created 2 years ago
1,330 stars

Top 30.2% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

LLPhant is a comprehensive PHP framework for building generative AI applications, inspired by Langchain. It simplifies complex AI tasks for PHP developers, enabling them to integrate LLMs like OpenAI, Anthropic, Mistral, and Ollama into their applications.

How It Works

LLPhant provides a modular architecture that abstracts away the complexities of interacting with various LLM providers and managing AI workflows. It supports core AI functionalities such as text generation, chat, image processing, speech-to-text, and embeddings. A key feature is its robust support for Retrieval-Augmented Generation (RAG), allowing developers to connect LLMs with vector stores for semantic search and question answering over private data.

Quick Start & Requirements

  • Install via Composer: composer require theodo-group/llphant
  • Requires PHP 8.1+.
  • Official documentation and examples are available.

Highlighted Details

  • Supports multiple LLM providers including OpenAI, Anthropic, Mistral, Ollama, and OpenAI-compatible APIs (e.g., LocalAI).
  • Offers extensive vector store integrations (Memory, FileSystem, Doctrine, Qdrant, Redis, Elasticsearch, Milvus, ChromaDB, AstraDB, Typesense).
  • Includes advanced features like tool usage, multi-query retrieval, prompt injection detection, reranking, and small-to-big retrieval.
  • Enables building autonomous agents (AutoPHP) and RAG systems.

Maintenance & Community

  • Sponsored by AGO and Theodo.
  • Active development and community contributions are encouraged.

Licensing & Compatibility

  • The project appears to be under the MIT license, allowing for commercial use and integration with closed-source applications.

Limitations & Caveats

  • Support for certain features, like array parameters in tools, is noted as experimental.
  • The FileSystemVectorStore is recommended only for small tests.
Health Check
Last Commit

1 week ago

Responsiveness

1 week

Pull Requests (30d)
5
Issues (30d)
2
Star History
19 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Jeffrey Morgan Jeffrey Morgan(Cofounder of Ollama), and
3 more.

modelfusion by vercel

0%
1k
TypeScript library for building AI applications
Created 2 years ago
Updated 1 year ago
Feedback? Help us improve.