Skip to content
Snippets Groups Projects
Commit ba502d5a authored by Marcus Johansson's avatar Marcus Johansson
Browse files

Issue #3489690: Add an event that triggers on chat iterator consumption

parent df29726e
No related branches found
No related tags found
1 merge request!295Resolve #3489690 "Add an event"
......@@ -172,7 +172,7 @@ class CountImagesSubscriber implements EventSubscriberInterface {
* @param \Drupal\ai\Event\PostStreamingResponseEvent $event
* The event to store output.
*/
public function stoureOutput(PreGenerateResponseEvent $event) {
public function storeOutput(PreGenerateResponseEvent $event) {
// Store the output.
$this->state[$event->getRequestThreadId()]['output'] = $event->getOutput();
}
......
......@@ -119,7 +119,7 @@ class PostGenerateResponseEventTest extends TestCase {
*/
public function testEventId(): void {
$event = $this->getEvent();
$this->assertEquals('unique_id', $event->getEventId());
$this->assertEquals('unique_id', $event->getRequestThreadId());
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment