45 lines
873 B
Plaintext
45 lines
873 B
Plaintext
<?php
|
|
|
|
namespace {{ namespace }};
|
|
|
|
use Laravel\Ai\Contracts\Agent;
|
|
use Laravel\Ai\Contracts\Conversational;
|
|
use Laravel\Ai\Contracts\HasTools;
|
|
use Laravel\Ai\Contracts\Tool;
|
|
use Laravel\Ai\Messages\Message;
|
|
use Laravel\Ai\Promptable;
|
|
use Stringable;
|
|
|
|
class {{ class }} implements Agent, Conversational, HasTools
|
|
{
|
|
use Promptable;
|
|
|
|
/**
|
|
* Get the instructions that the agent should follow.
|
|
*/
|
|
public function instructions(): Stringable|string
|
|
{
|
|
return 'You are a helpful assistant.';
|
|
}
|
|
|
|
/**
|
|
* Get the list of messages comprising the conversation so far.
|
|
*
|
|
* @return Message[]
|
|
*/
|
|
public function messages(): iterable
|
|
{
|
|
return [];
|
|
}
|
|
|
|
/**
|
|
* Get the tools available to the agent.
|
|
*
|
|
* @return Tool[]
|
|
*/
|
|
public function tools(): iterable
|
|
{
|
|
return [];
|
|
}
|
|
}
|