@@ -132,7 +132,7 @@ public function newSession(int $timestamp, ?string $title = null): JSONResponse
132
132
Application::APP_ID ,
133
133
'chat_user_instructions ' ,
134
134
Application::CHAT_USER_INSTRUCTIONS ,
135
- );
135
+ ) ?: Application:: CHAT_USER_INSTRUCTIONS ;
136
136
$ userInstructions = str_replace ('{user} ' , $ user ->getDisplayName (), $ userInstructions );
137
137
138
138
try {
@@ -654,7 +654,7 @@ public function generateTitle(int $sessionId): JSONResponse {
654
654
Application::APP_ID ,
655
655
'chat_user_instructions_title ' ,
656
656
Application::CHAT_USER_INSTRUCTIONS_TITLE ,
657
- );
657
+ ) ?: Application:: CHAT_USER_INSTRUCTIONS_TITLE ;
658
658
$ userInstructions = str_replace ('{user} ' , $ user ->getDisplayName (), $ userInstructions );
659
659
660
660
$ systemPrompt = '' ;
@@ -733,7 +733,7 @@ public function checkTitleGenerationTask(int $taskId, int $sessionId): JSONRespo
733
733
Application::APP_ID ,
734
734
'chat_user_instructions_title ' ,
735
735
Application::CHAT_USER_INSTRUCTIONS_TITLE ,
736
- );
736
+ ) ?: Application:: CHAT_USER_INSTRUCTIONS_TITLE ;
737
737
$ userInstructions = str_replace ('{user} ' , $ user ->getDisplayName (), $ userInstructions );
738
738
$ title = str_replace ($ userInstructions , '' , $ taskOutput );
739
739
$ title = str_replace ('" ' , '' , $ title );
0 commit comments