diff --git a/Classes/Controller/AssistantModuleController.php b/Classes/Controller/AssistantModuleController.php index 9536e5e..ebecc68 100644 --- a/Classes/Controller/AssistantModuleController.php +++ b/Classes/Controller/AssistantModuleController.php @@ -133,7 +133,7 @@ public function addThreadMessageAction(string $organizationId, string $threadId, $organization = $this->organizationRepository->findById($organizationId); $assistant = $organization->assistantDepartment->findAssistantById($assistantId); try { - $assistant->continueThread($threadId, $message, $withAdditionalInstructions); + $assistant->continueThread($threadId, $message); $metadata = $assistant->getCollectedMetadata(); $this->view->assignMultiple([ 'organizationId' => $organizationId, diff --git a/Classes/Controller/ChatController.php b/Classes/Controller/ChatController.php index 7d6159f..0126f7a 100644 --- a/Classes/Controller/ChatController.php +++ b/Classes/Controller/ChatController.php @@ -38,7 +38,7 @@ public function startAction(string $organizationId, string $assistantId, string $organization = $this->organizationRepository->findById($organizationId); $assistant = $organization->assistantDepartment->findAssistantById($assistantId); $threadId = $assistant->startThread(); - $assistant->continueThread($threadId, $message, true); + $assistant->continueThread($threadId, $message); $messageResponses = $assistant->readThread($threadId); $lastMessageKey = array_key_last($messageResponses); diff --git a/Classes/Domain/Assistant.php b/Classes/Domain/Assistant.php index 2da4733..c821f9a 100644 --- a/Classes/Domain/Assistant.php +++ b/Classes/Domain/Assistant.php @@ -51,7 +51,7 @@ public function startThread(): string return $threadResponse->id; } - public function continueThread(string $threadId, string $message, bool $withAdditionalInstructions = false): void + public function continueThread(string $threadId, string $message): void { $this->client->threads()->messages()->create( $threadId, @@ -65,9 +65,7 @@ public function continueThread(string $threadId, string $message, bool $withAddi $threadId, array_filter([ 'assistant_id' => $this->id, - 'additional_instructions' => $withAdditionalInstructions - ? $this->instructions->getContent() - : null + 'additional_instructions' => $this->instructions->getContent() ]) ); $this->completeRun($threadId, $runResponse->id);