<?php

namespace boru\boruai\Openai\Stream\Contract;

use boru\boruai\Openai\Stream\StreamEvent;

interface StreamEventListenerInterface
{
    /**
     * Whether this listener wants to handle the given event.
     *
     * Return true to indicate the event was handled (and the dispatcher
     * may or may not continue to other listeners, depending on config).
     *
     * @param StreamEvent $event
     * @return bool
     */
    public function handle(StreamEvent $event);
}
