PHP code example of bogdankharchenko / laravel-graphiti
1. Go to this page and download the library: Download bogdankharchenko/laravel-graphiti 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/ */
bogdankharchenko / laravel-graphiti example snippets
use BogdanKharchenko\Graphiti\Data\Message;
use BogdanKharchenko\Graphiti\Facades\Graphiti;
Graphiti::addMessages('team-eng', [
new Message(
content: $transcriptChunk, // "Speaker: text" lines
role: 'transcript',
name: 'Standup 2026-08-06 (part 1/3)',
timestamp: $meetingStartedAt, // real-world time, not ingestion time
sourceDescription: 'Tuple call transcript',
),
]);
$messages = LazyCollection::make(function () use ($calls) {
foreach ($calls as $call) {
yield from $this->toMessages($call); // never all in memory at once
}
});
$sent = Graphiti::addMessages('team-eng', $messages, chunkSize: 25);