chatMessage->store($chat, ChatRoles::USER, $prompt); $socialMediaResponse = $this->contentWriterAgent->prompt($prompt); $postText = $socialMediaResponse->text; /* @var ChatMessage $aiChat */ $aiChat = $this->chatMessage->store($chat, ChatRoles::AI, $postText); $imagePromptResponse = $this->creativeDirectorAgent->prompt($postText); $imagePrompt = $imagePromptResponse->text; return new SocialMediaPostResponseDto($aiChat->id, $postText, $imagePrompt, now()); } }