PHP code example of woutersf / ai-connection-bundle
1. Go to this page and download the library: Download woutersf/ai-connection-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
woutersf / ai-connection-bundle example snippets
// Get the service from the container
$liteLLMService = $this->container->get('mautic.ai_connection.service.litellm');
use MauticPlugin\MauticAIconnectionBundle\Service\LiteLLMService;
class YourController extends CommonController
{
public static function getSubscribedServices(): array
{
return array_merge(parent::getSubscribedServices(), [
'mautic.ai_connection.service.litellm' => LiteLLMService::class,
]);
}
public function yourAction()
{
$liteLLMService = $this->container->get('mautic.ai_connection.service.litellm');
// Use the service...
}
}