neoban/backend/app/Ai/Agents/CreativeDirectorAgent.php
kushal-saha d818c5f05d refactor(core): restructure chat models and services, integrate route-based chat IDs
- Updated `Chat` and `ChatMessage` models for new table structures with UUIDs and attributes.
- Integrated `ChatPolicy` for authorization checks.
- Updated `ChatMessageController` with authorization and refined logic.
- Adjusted routes and state in the frontend to handle chat IDs from the URL.
- Enhanced `SocialMediaService` for handling chat-specific user prompts.
- Removed unused migrations related to chats and chat messages.
2026-04-29 15:36:56 +00:00

29 lines
887 B
PHP

<?php
namespace App\Ai\Agents;
use Laravel\Ai\Attributes\Provider;
use Laravel\Ai\Concerns\RemembersConversations;
use Laravel\Ai\Contracts\Agent;
use Laravel\Ai\Contracts\Conversational;
use Laravel\Ai\Enums\Lab;
use Laravel\Ai\Promptable;
use Stringable;
#[Provider(Lab::Groq)]
class CreativeDirectorAgent implements Agent, Conversational
{
use Promptable, RemembersConversations;
/**
* Get the instructions that the agent should follow.
*/
public function instructions(): Stringable|string
{
return 'You are a creative director. Read the following social media post and '.
'write a single, vivid, descriptive image prompt (max 30 words) for an '.
'AI image generator. The scene must be visually compelling and directly '.
"relevant to the post's topic. Return ONLY the image prompt — nothing else.";
}
}