parse($completion); } /** * Instructions on how the LLM output should be formatted. * * @return string */ public function getFormatInstructions() { throw new NotImplemented(); } /** * Return the type key. * * @return string */ public function getType() { throw new NotImplemented(); } /** * Return dictionary representation of output parser. * * @param array $additionalParameters Additional parameters to include in the output * @return array */ abstract public function toArray(array $additionalParameters = []): array; }