<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Sami Maameri</title>
    <description>The latest articles on Forem by Sami Maameri (@smaameri).</description>
    <link>https://forem.com/smaameri</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1094153%2Fb9b62992-e780-494d-83e4-ebb3f9e3b351.jpg</url>
      <title>Forem: Sami Maameri</title>
      <link>https://forem.com/smaameri</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/smaameri"/>
    <language>en</language>
    <item>
      <title>PHP Library for Working with LLM, Agents and RAG</title>
      <dc:creator>Sami Maameri</dc:creator>
      <pubDate>Thu, 29 Aug 2024 05:37:10 +0000</pubDate>
      <link>https://forem.com/smaameri/php-library-for-working-with-llm-agents-and-rag-oh3</link>
      <guid>https://forem.com/smaameri/php-library-for-working-with-llm-agents-and-rag-oh3</guid>
      <description>&lt;p&gt;Hello All,&lt;/p&gt;

&lt;p&gt;I kicked of a small PHP package, with the aim of making it easy to work with LLMs, Agents and RAG in PHP.&lt;/p&gt;

&lt;p&gt;It's just got a single method/class just now :) (release fast!?)&lt;/p&gt;

&lt;p&gt;Wondering if it is something that sound's interesting to the PHP community. Why should Python guys have all the fun!&lt;/p&gt;

&lt;p&gt;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 &lt;a href="https://github.com/smaameri/squad" rel="noopener noreferrer"&gt;github&lt;/a&gt;, and it is available on &lt;a href="https://packagist.org/packages/smaameri/squad" rel="noopener noreferrer"&gt;packagist&lt;/a&gt; also.&lt;/p&gt;

&lt;p&gt;Like I said, it currently just supports one action, which allows you to send a message to OpenAI Chat by doing&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$chat = new ChatOpenAI(getenv('OPENAI_API_KEY'));
$response = $chat-&amp;gt;sendMessage('Hello, world!');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I know there is the LLPhant library, but this could evolve to be something a little different, perhaps with its own benefits&lt;/p&gt;

&lt;p&gt;Any feedback? Feature requests would be great too.&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;

&lt;p&gt;Sami&lt;/p&gt;

</description>
      <category>php</category>
      <category>llm</category>
      <category>rag</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
