1. Go to this page and download the library: Download serhiilabs/inscribe library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
serhiilabs / inscribe example snippets
$prompt = "You are a helpful assistant.\n\n";
$prompt .= "Context: The user is asking about {$topic}.\n\n";
$prompt .= "User question: {$question}\n\n";
$prompt .= "Please provide a detailed answer.";
use SerhiiLabs\Inscribe\Facades\Inscribe;
$prompt = Inscribe::make()
->context(['topic' => 'Laravel'])
->i.instruction')
->build();
use SerhiiLabs\Inscribe\Contracts\TemplateBuilderInterface;
class EmailService
{
public function __construct(
private TemplateBuilderInterface $templates,
) {}
public function buildEmail(string $name): string
{
return $this->templates->make()
->context(['sender' => 'Support Team'])
->