php |llm |rag |ai

PHP Library for Working with LLM, Agents and RAG

smaameri

Sami Maameri

Posted on August 29, 2024

PHP Library for Working with LLM, Agents and RAG

Hello All,

I kicked of a small PHP package, with the aim of making it easy to work with LLMs, Agents and RAG in PHP.

It's just got a single method/class just now :) (release fast!?)

Wondering if it is something that sound's interesting to the PHP community. Why should Python guys have all the fun!

Would be great to have some sign of interest, and even feature requests, to inspire me to put some more work into it. Have kicked off the package here on github, and it is available on packagist also.

Like I said, it currently just supports one action, which allows you to send a message to OpenAI Chat by doing

$chat = new ChatOpenAI(getenv('OPENAI_API_KEY'));
$response = $chat->sendMessage('Hello, world!');
Enter fullscreen mode Exit fullscreen mode

I know there is the LLPhant library, but this could evolve to be something a little different, perhaps with its own benefits

Any feedback? Feature requests would be great too.

Thanks!

Sami

💖 💪 🙅 🚩
smaameri
Sami Maameri

Posted on August 29, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related