SuperSeller3000/migrations/Version20260520020000.php

52 lines
1.7 KiB
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20260520020000 extends AbstractMigration
{
public function getDescription(): string
{
return 'Update specs_research prompt to include {{searchResults}} from Tavily';
}
public function up(Schema $schema): void
{
$body = <<<'PROMPT'
You are a hardware specifications expert. Extract the technical specifications for the {{articleType}}: "{{subject}}".
Web search results:
{{searchResults}}
Based on the search results above, list all technical specifications including:
processor, RAM, storage variants, display size and resolution, GPU, battery capacity,
ports, connectivity, weight, dimensions, OS, and any other relevant specs.
Be specific and accurate. If a spec is not found in the search results, omit it rather than guessing.
PROMPT;
$this->addSql(
"UPDATE app.prompt_templates SET body = :body WHERE key = 'specs_research'",
['body' => $body],
);
}
public function down(Schema $schema): void
{
$body = <<<'PROMPT'
List all known technical specifications for the {{articleType}}: "{{subject}}".
Include: processor, RAM, storage variants, display size and resolution, GPU, battery capacity,
ports, connectivity, weight, dimensions, OS, and any other relevant specs.
If you know this device, be specific and complete. If it is unknown, say so explicitly.
PROMPT;
$this->addSql(
"UPDATE app.prompt_templates SET body = :body WHERE key = 'specs_research'",
['body' => $body],
);
}
}