Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
search_api_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
search_api_ai
Merge requests
!1
By yanniboi: Ability to log chat responses with event dispatcher.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
By yanniboi: Ability to log chat responses with event dispatcher.
chat-logging
into
1.0.x
Overview
0
Commits
1
Pipelines
0
Changes
2
Open
Yan Loetzer
requested to merge
chat-logging
into
1.0.x
1 year ago
Overview
0
Commits
1
Pipelines
0
Changes
2
Expand
0
0
Merge request reports
Compare
1.0.x
1.0.x (base)
and
latest version
latest version
4078a7a1
1 commit,
1 year ago
2 files
+
62
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
src/Event/ChatResponseEvent.php
0 → 100644
+
41
−
0
Options
<?php
namespace
Drupal\search_api_ai\Event
;
use
Drupal\Component\EventDispatcher\Event
;
/**
* Event that is fired when chat gpt response comes in.
*/
class
ChatResponseEvent
extends
Event
{
const
EVENT_NAME
=
'search_api_ai_chat_response'
;
/**
* The prompt that was sent.
*
* @var string
*/
public
$prompt
;
/**
* The chat response.
*
* @var string
*/
public
$question
;
/**
* Constructs the object.
*
* @param string $prompt
* The prompt that was sent.
* @param string $response
* The chat response.
*/
public
function
__construct
(
string
$prompt
,
string
$response
)
{
$this
->
prompt
=
$prompt
;
$this
->
response
=
$response
;
}
}
Loading