<?php
namespace App\AI\SymfonyAiExtend\Toolbox; use App\AI\Contexts\ReportsData\ClientInvoices; use App\AI\Contexts\ReportsData\Corporates; class AnalyticsToolHandler { public function __construct( private readonly ClientInvoices $clientInvoices, private readonly Corporates $corporates, ) { } public function run_rd_clientInvoices_analytics( array $metrics, array $filters = [], ?string $sort_by = null, ?string $sort_order = null, ?string $group_by = null, ?string $sum_col = null, ?int $limit = null, ): array { return $this->clientInvoices->executeFunction_run_rd_clientInvoices_analytics( json_encode(compact('metrics', 'filters', 'sort_by', 'sort_order', 'group_by', 'sum_col', 'limit')) ); } public function run_rd_corporates_analytics( array $metrics, array $filters = [], ?string $sort_by = null, ?string $sort_order = null, ?string $group_by = null, ?string $sum_col = null, ?int $limit = null, ): array { return $this->corporates->executeFunction_run_rd_corporates_analytics( json_encode(compact('metrics', 'filters', 'sort_by', 'sort_order', 'group_by', 'sum_col', 'limit')) ); } }