@@ -199,7 +199,7 @@ private function improveAgencyActionNames(array $actions): array {
199199 *
200200 * Create a new chat session, add a system message with user instructions
201201 *
202- * @param int $timestamp The session creation date
202+ * @param ? int $timestamp The session creation date
203203 * @param ?string $title The session title
204204 * @return JSONResponse<Http::STATUS_OK, array{session: AssistantChatSession}, array{}>|JSONResponse<Http::STATUS_INTERNAL_SERVER_ERROR|Http::STATUS_UNAUTHORIZED, array{error: string}, array{}>
205205 * @throws AppConfigTypeConflictException
@@ -209,7 +209,7 @@ private function improveAgencyActionNames(array $actions): array {
209209 */
210210 #[NoAdminRequired]
211211 #[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT , tags: ['chat_api ' ])]
212- public function newSession (int $ timestamp , ?string $ title = null ): JSONResponse {
212+ public function newSession (? int $ timestamp = null , ?string $ title = null ): JSONResponse {
213213 try {
214214 $ session = $ this ->chatService ->createChatSession ($ this ->userId , $ timestamp , $ title );
215215 return new JSONResponse ([
@@ -342,7 +342,7 @@ public function getSessions(): JSONResponse {
342342 * @param int $sessionId The chat session ID
343343 * @param string $role Role of the message (human, assistant etc...)
344344 * @param string $content Content of the message
345- * @param int $timestamp Date of the message
345+ * @param ? int $timestamp Date of the message
346346 * @param ?list<array{type: string, file_id: int}> $attachments List of attachment objects
347347 * @param bool $firstHumanMessage Is it the first human message of the session?
348348 * @return JSONResponse<Http::STATUS_OK, AssistantChatMessage, array{}>|JSONResponse<Http::STATUS_INTERNAL_SERVER_ERROR|Http::STATUS_UNAUTHORIZED|Http::STATUS_BAD_REQUEST|Http::STATUS_NOT_FOUND, array{error: string}, array{}>
@@ -355,7 +355,7 @@ public function getSessions(): JSONResponse {
355355 #[NoAdminRequired]
356356 #[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT , tags: ['chat_api ' ])]
357357 public function newMessage (
358- int $ sessionId , string $ role , string $ content , int $ timestamp , ?array $ attachments = null , bool $ firstHumanMessage = false ,
358+ int $ sessionId , string $ role , string $ content , ? int $ timestamp = null , ?array $ attachments = null , bool $ firstHumanMessage = false ,
359359 ): JSONResponse {
360360 try {
361361 $ message = $ this ->chatService ->createMessage ($ this ->userId , $ sessionId , $ role , $ content , $ timestamp , $ attachments , $ firstHumanMessage );
0 commit comments