Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ai
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
ai
Commits
ba502d5a
Commit
ba502d5a
authored
2 months ago
by
Marcus Johansson
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3489690
: Add an event that triggers on chat iterator consumption
parent
df29726e
No related branches found
No related tags found
1 merge request
!295
Resolve #3489690 "Add an event"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/developers/events.md
+1
-1
1 addition, 1 deletion
docs/developers/events.md
tests/src/Unit/Event/PostGenerateResponseEventTest.php
+1
-1
1 addition, 1 deletion
tests/src/Unit/Event/PostGenerateResponseEventTest.php
with
2 additions
and
2 deletions
docs/developers/events.md
+
1
−
1
View file @
ba502d5a
...
...
@@ -172,7 +172,7 @@ class CountImagesSubscriber implements EventSubscriberInterface {
* @param \Drupal\ai\Event\PostStreamingResponseEvent $event
* The event to store output.
*/
public
function
sto
u
reOutput
(
PreGenerateResponseEvent
$event
)
{
public
function
storeOutput
(
PreGenerateResponseEvent
$event
)
{
// Store the output.
$this
->
state
[
$event
->
getRequestThreadId
()][
'output'
]
=
$event
->
getOutput
();
}
...
...
This diff is collapsed.
Click to expand it.
tests/src/Unit/Event/PostGenerateResponseEventTest.php
+
1
−
1
View file @
ba502d5a
...
...
@@ -119,7 +119,7 @@ class PostGenerateResponseEventTest extends TestCase {
*/
public
function
testEventId
():
void
{
$event
=
$this
->
getEvent
();
$this
->
assertEquals
(
'unique_id'
,
$event
->
get
Event
Id
());
$this
->
assertEquals
(
'unique_id'
,
$event
->
get
RequestThread
Id
());
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment