-
Notifications
You must be signed in to change notification settings - Fork 1
/
BuildPrompt.php
36 lines (26 loc) · 1.08 KB
/
BuildPrompt.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
namespace App\Commands;
use App\Enums\Rune;
use LaravelZero\Framework\Commands\Command;
class BuildPrompt extends Command
{
protected $signature = 'app:build-prompt';
protected $description = 'Build a Gematria Primus prompt for OpenAI';
public function handle(): int
{
$prompt = <<<'PROMPT'
Gematria Primus is a cipher that encodes the Latin alphabet into 24 runic characters.
The alphabet was built for the Cicada 3301 challenge and not directly related to a specific Runic alphabet.
However, the runic characters are similar to the Elder Futhark and Anglo-Saxon alphabets.
The runic characters are then used to encode a message.
The runic characters are as follows:
As I give you images - please return the translation and only that.
PROMPT;
foreach (Rune::cases() as $rune) {
$prompt .= "\nRune: {$rune->value} Letter: {$rune->toSingleLetter()} Number: {$rune->toInt()}";
}
$prompt .= PHP_EOL;
$this->output->write($prompt);
return self::SUCCESS;
}
}