Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: chat title generation
Signed-off-by: Jana Peper <[email protected]>
  • Loading branch information
janepie committed Jul 8, 2025
commit 522bdfcc119340e8e2f168f42e8df146dec54d61
4 changes: 2 additions & 2 deletions lib/Controller/ChattyLLMController.php
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ public function generateTitle(int $sessionId): JSONResponse {
Application::APP_ID,
'chat_user_instructions_title',
Application::CHAT_USER_INSTRUCTIONS_TITLE,
);
) ?: Application::CHAT_USER_INSTRUCTIONS_TITLE;
$userInstructions = str_replace('{user}', $user->getDisplayName(), $userInstructions);

$systemPrompt = '';
Expand Down Expand Up @@ -733,7 +733,7 @@ public function checkTitleGenerationTask(int $taskId, int $sessionId): JSONRespo
Application::APP_ID,
'chat_user_instructions_title',
Application::CHAT_USER_INSTRUCTIONS_TITLE,
);
) ?: Application::CHAT_USER_INSTRUCTIONS_TITLE;
$userInstructions = str_replace('{user}', $user->getDisplayName(), $userInstructions);
$title = str_replace($userInstructions, '', $taskOutput);
$title = str_replace('"', '', $title);
Expand Down