Download the PHP package ngandu-dev/lugha without Composer
On this page you can find all versions of the php package ngandu-dev/lugha. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ngandu-dev/lugha
More information about ngandu-dev/lugha
Files in ngandu-dev/lugha
Package lugha
Short Description Lugha is a PHP Generative AI framework to build chatbot, RAG systems and AI-powered applications
License MIT
Homepage https://github.com/ngandu-dev/lugha
Informations about the package lugha
Lugha - yet another PHP Generative AI Framework
[!IMPORTANT]
Lugha is abandoned in favor of Symfony AI - github.com/symfony/ai. Please use the new repository for all future development, issues, and contributions.
Lugha from Swahili meaning "Language" is a PHP Generative AI Framework that provides a simple and easy way to interact with various AI providers. The main idea is to provide a unified provider-agnostic API for AI models, making it easier to switch between providers.
This project is highly inspired by LangChain and LLPhant, designed for Chatbot, RAG (Retrieval-Augmented Generation) based applications with integration of Embeddings, Completion and Reranking models.
Features
- Provider-agnostic completion, embeddings, and reranking APIs
- Chat history and tool calling
- Document loaders, retrieval, and vector stores
Requirements
- PHP 8.3 or later
- Composer 2
supported providers:
| Provider | Link | Features |
|---|---|---|
| OpenAI | openai.com | Completion, Embeddings |
| Mistral | mistral.ai | Completion, Embeddings |
| ai.google | Completion, Embeddings | |
| GitHub | github.com | Completion, Embeddings |
| Anthropic | anthropic.com | Completion |
| Voyager.ai | voyageai.com | Embeddings, Reranking |
| Ollama | ollama.com | Completion, Embeddings |
| Deepseek | deepseek.com | completion |
Installation
Usage
Embeddings
Embeddings are a type of word representation that allows words with similar meaning to have a similar representation. they can be used to find the similarity between words, phrases, or sentences. useful for document classification, clustering, and information retrieval.
Completion
Completion models are designed to generate human-like text based on the input prompt.
-
completion from a single prompt
-
completion from a chat history (conversation)
- completion with tool calling
Reranking
Reranking models are designed to re-rank a list of documents based on the input prompt. useful for search engines, recommendation systems, and information retrieval.
Development
Contributing
See CONTRIBUTING.md before opening an issue or pull request.
Security
Report vulnerabilities privately as described in SECURITY.md.
License
Released under the MIT License.
Contributors
All versions of lugha with dependencies
symfony/http-client Version ^7.2
webmozart/assert Version ^1.11
symfony/filesystem Version ^7.2