From 195e6c0693802eb55603ec5754c9a7abcba8aacc Mon Sep 17 00:00:00 2001 From: Babak Alizadeh Date: Sat, 26 Jul 2025 12:46:50 -0700 Subject: [PATCH] last bug fix in tonight --- hesabixCore/src/AiTool/TicketService.php | 25 ++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/hesabixCore/src/AiTool/TicketService.php b/hesabixCore/src/AiTool/TicketService.php index 274d52d..7b7fd99 100644 --- a/hesabixCore/src/AiTool/TicketService.php +++ b/hesabixCore/src/AiTool/TicketService.php @@ -18,8 +18,11 @@ class TicketService */ public function getTools(): array { - return [ - [ + $tools = []; + + $tools[] = [ + 'type' => 'function', + 'function' => [ 'name' => 'get_user_tickets', 'description' => 'Retrieve a list of tickets for the current user', 'parameters' => [ @@ -32,8 +35,12 @@ class TicketService ], 'required' => ['user'] ] - ], - [ + ] + ]; + + $tools[] = [ + 'type' => 'function', + 'function' => [ 'name' => 'create_or_update_ticket', 'description' => 'Create a new ticket or update an existing one', 'parameters' => [ @@ -83,8 +90,12 @@ class TicketService ], 'required' => ['params', 'files', 'user'] ] - ], - [ + ] + ]; + + $tools[] = [ + 'type' => 'function', + 'function' => [ 'name' => 'get_ticket_details', 'description' => 'Get detailed information about a specific ticket including its conversation history', 'parameters' => [ @@ -103,6 +114,8 @@ class TicketService ] ] ]; + + return $tools; } /**