| 1 |
<?php |
| 2 |
|
| 3 |
namespace FluentSupport\App\Services\Integrations\FluentBot; |
| 4 |
|
| 5 |
use FluentSupport\App\Services\Integrations\FluentBot\FluentBotHelper; |
| 6 |
|
| 7 |
class FluentBotService |
| 8 |
{ |
| 9 |
public function getPresetPrompts($type): array |
| 10 |
{ |
| 11 |
return (new FluentBotHelper())->getPresetPrompts($type); |
| 12 |
} |
| 13 |
|
| 14 |
public function modifyResponse(string $prompt, $selectedText, $ticketId) |
| 15 |
{ |
| 16 |
return (new FluentBotHelper())->modifyResponse($prompt, $selectedText, $ticketId); |
| 17 |
} |
| 18 |
|
| 19 |
public function generateResponse(string $responseContent, $ticket, $productId, $chatId = null) |
| 20 |
{ |
| 21 |
return (new FluentBotHelper())->generateResponse($responseContent, $ticket, $productId, $chatId); |
| 22 |
} |
| 23 |
|
| 24 |
public function generateStreamResponse(string $responseContent, $ticket, $productId, $chatId = null, $selectedConversations = null, $includeTicketContent = true, $seedMessages = null, $webSearch = false, $temperature = 0) |
| 25 |
{ |
| 26 |
return (new FluentBotHelper())->generateStreamResponse($responseContent, $ticket, $productId, $chatId, $selectedConversations, $includeTicketContent, $seedMessages, $webSearch, $temperature); |
| 27 |
} |
| 28 |
|
| 29 |
public function getTicketSummary($ticket) |
| 30 |
{ |
| 31 |
return (new FluentBotHelper())->generateTicketSummary($ticket); |
| 32 |
} |
| 33 |
|
| 34 |
public function getTicketTone($ticket) |
| 35 |
{ |
| 36 |
return (new FluentBotHelper())->generateTicketTone($ticket); |
| 37 |
} |
| 38 |
|
| 39 |
public function getChatMessages($chatId, $productId = null, $cursor = null) |
| 40 |
{ |
| 41 |
return (new FluentBotHelper())->getChatMessages($chatId, $productId, $cursor); |
| 42 |
} |
| 43 |
|
| 44 |
public function getCustomPresets(): array |
| 45 |
{ |
| 46 |
return (new FluentBotHelper())->getCustomPresets(); |
| 47 |
} |
| 48 |
|
| 49 |
public function saveCustomPresets(array $presets): array |
| 50 |
{ |
| 51 |
return (new FluentBotHelper())->saveCustomPresets($presets); |
| 52 |
} |
| 53 |
|
| 54 |
} |
| 55 |
|