Download the PHP package theodo-group/llphant without Composer
On this page you can find all versions of the php package theodo-group/llphant. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package llphant
LLPhant - The PHP library for Gen AI and Vector Databases
We designed this framework to be as simple as possible, while still providing you with the tools you need to build powerful apps. It is compatible with Symfony and Laravel.
We are working to expand the support of different LLMs. Right now, we are supporting OpenAI, Anthropic, Mistral, Ollama, llmman, LM Studio, Atlas Cloud and services compatible with the OpenAI API such as LocalAI. Ollama that can be used to run LLM locally such as Llama 2.
🚀 New: JevClassifier with typed Score classification
LLPhant now supports typed Jev classification with Noul, Choice, and
the new Score rubric-based questions via JevClassifier.
Returned answers now also expose Jev usage metadata via inputTokens and
outputTokens fields.
The same Jev integration can now be used to detect malicious prompt injections
in QuestionAnswering through ClassifierPromptInjectionQueryTransformer.
To use JevClassifier, set your API key:
Then instantiate new JevClassifier(). If you prefer, you can also pass the
key explicitly through new JevConfig(apiKey: '...').
See the full Jev API reference: https://docs.typesafe.ai/api and the LLPhant Jev guide in docs/jev-classifier.rst.
Similar projects
We want to thank few amazing projects that we use here or inspired us:
- the learnings from using LangChain and LLamaIndex
- the excellent work from the OpenAI PHP SDK.
We can find great external resource on LLPhant (ping us to add yours):
- 🇫🇷 Construire un RAG en PHP avec la doc de Symfony, LLPhant et OpenAI : Tutoriel Complet
- 🇫🇷 Retour d'expérience sur la création d'un agent autonome
- 🇬🇧 Exploring AI riding an LLPhant
- 🇬🇧 Evaluating LLM and AI agents Outputs with String Comparison, Criteria & Trajectory Approaches
Get Started
Note
Requires PHP 8.1+
First, install LLPhant via the Composer package manager:
In case you have not installed the GD extension, and you do not want to add it to your PHP setup,
you can use the --ignore-platform-req=ext-gd option
If you want to try the latest features of this library, you can use:
You may also want to check the requirements for OpenAI PHP SDK as it is the main client.
Documentation
Find documentation in the docs directory or online at https://llphant.readthedocs.org
The documentation includes a JevClassifier guide with typed classification examples for Noul, Choice, and the new Score rubric-based questions.
Contributing
See CONTRIBUTING for details.
Contributors
Thanks to our contributors:
Sponsor
LLPhant is sponsored by :
All versions of llphant with dependencies
guzzlehttp/guzzle Version ^7.4.5
guzzlehttp/psr7 Version ^2.7
openai-php/client Version ^v0.19.2
php-http/discovery Version ^1.20.0
php-http/multipart-stream-builder Version ^1.4.2
phpoffice/phpword Version ^1.4.0
psr/http-client Version ^1.0.3
psr/http-message Version ^1.0 || ^2.0
psr/log Version ^3.0
smalot/pdfparser Version ^2.11
yethee/tiktoken Version ^0.10.0