PHP Library for Working with LLM, Agents and RAG

王林
Release: 2024-08-29 14:34:35
Original
815 people have browsed it

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!');
Copy after login

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

The above is the detailed content of PHP Library for Working with LLM, Agents and RAG. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template