first commit
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace {{ namespace }};
|
||||
|
||||
use Illuminate\Contracts\JsonSchema\JsonSchema;
|
||||
use Laravel\Ai\Contracts\Tool;
|
||||
use Laravel\Ai\Tools\Request;
|
||||
use Stringable;
|
||||
|
||||
class {{ class }} implements Tool
|
||||
{
|
||||
/**
|
||||
* Get the description of the tool's purpose.
|
||||
*/
|
||||
public function description(): Stringable|string
|
||||
{
|
||||
return 'A description of the tool.';
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the tool.
|
||||
*/
|
||||
public function handle(Request $request): Stringable|string
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the tool's schema definition.
|
||||
*/
|
||||
public function schema(JsonSchema $schema): array
|
||||
{
|
||||
return [
|
||||
'value' => $schema->string()->required(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user