PHP code example of syofyanzuhad / filament-chatflow
1. Go to this page and download the library: Download syofyanzuhad/filament-chatflow 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/ */
syofyanzuhad / filament-chatflow example snippets
use Syofyanzuhad\FilamentChatflow\FilamentChatflowPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
FilamentChatflowPlugin::make(),
]);
}
// Get chatflow configuration
GET /api/chatflow/{chatflow}/config
// Start a conversation
POST /api/chatflow/{chatflow}/start
// Send a message
POST /api/chatflow/message
// End a conversation
POST /api/chatflow/end
// Get conversation history
GET /api/chatflow/history