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
771cf1a4
Commit
771cf1a4
authored
1 month ago
by
Antonio De Marco
Committed by
Marcus Johansson
1 month ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3499970
: fix hardcoded view mode value on form and load view mode from...
parent
153b9b5c
No related branches found
No related tags found
1 merge request
!411
Issue #3499970: fix hardcoded view mode value on form and load view mode from...
Pipeline
#402032
passed
1 month ago
Stage: build
Stage: validate
Stage: test
Stage: .post
Stage: deploy
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/ai_search/src/Plugin/AiAssistantAction/RagAction.php
+2
-2
2 additions, 2 deletions
modules/ai_search/src/Plugin/AiAssistantAction/RagAction.php
with
2 additions
and
2 deletions
modules/ai_search/src/Plugin/AiAssistantAction/RagAction.php
+
2
−
2
View file @
771cf1a4
...
...
@@ -359,7 +359,7 @@ class RagAction extends AiAssistantActionBase {
}
// Render the entity in selected view mode.
$view_mode
=
$rag_database
[
'
aggregated_llm
'
]
??
'full'
;
$view_mode
=
$rag_database
[
'
rendered_view_mode
'
]
??
'full'
;
$pre_render_entity
=
$this
->
entityTypeManager
->
getViewBuilder
(
$entity_type
)
->
view
(
$entity
,
$view_mode
);
$rendered
=
$this
->
renderer
->
render
(
$pre_render_entity
);
$rendered_entities
[]
=
$this
->
converter
->
convert
((
string
)
$rendered
);
...
...
@@ -482,7 +482,7 @@ class RagAction extends AiAssistantActionBase {
'#title'
=>
$this
->
t
(
'RAG rendered view mode'
),
'#description'
=>
$this
->
t
(
'Select a preferred view mode. If not found, the default view mode will be used for the given entity type.'
),
'#options'
=>
$options
,
'#default_value'
=>
'full'
,
'#default_value'
=>
$this
->
configuration
[
'rag_'
.
$i
][
'rendered_view_mode'
]
??
'full'
,
'#states'
=>
[
'visible'
=>
[
':input[name="action_plugin_rag_action[configuration][rag_'
.
$i
.
'][output_mode]"]'
=>
[
'value'
=>
'rendered'
],
...
...
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