> */ public array $embeddings = []; /** @var array */ public array $responses = []; /** @var array */ public array $generatedPrompts = []; public function embed(string $text): array { return $this->embeddings[$text] ?? [0.1, 0.2, 0.3]; } public function generate(string $prompt, array $options = []): string { $this->generatedPrompts[] = [ 'prompt' => $prompt, 'options' => $options, ]; return array_shift($this->responses) ?? '{}'; } }