Favicon of LLPhant

LLPhant

An open-source PHP AI framework for Symfony and Laravel, with local model support through Ollama, LM Studio and OpenAI-compatible services.

LLPhant is an MIT-licensed PHP framework for adding language models, embeddings and vector databases to Symfony and Laravel applications. It requires PHP 8.1 or later and is installed through Composer.

Local model connections include Ollama, LM Studio and llmman. It also connects to LocalAI and other services with an OpenAI-compatible API. Cloud providers include OpenAI, Anthropic, Mistral and Atlas Cloud. Processing follows the selected backend: local connections can use your own hardware, while cloud connections send requests to that provider.

For retrieval-augmented answers, its QuestionAnswering class searches a vector store for relevant private documents and passes the retrieved material to a language model. The documented workflow reads files, splits them into chunks and embeds them before retrieval.

Its JevClassifier integration provides typed classification through the Jev API and requires an API key. It supports Noul and Choice questions and rubric-based Score questions, with input and output token usage returned alongside answers. Documentation is available in the repository and on Read the Docs.

Similar to LLPhant