<?phprequire'examples/boot.php';useCognesy\Events\Dispatchers\SymfonyEventDispatcher;useCognesy\Instructor\StructuredOutput;useCognesy\Polyglot\Inference\Enums\OutputMode;useSymfony\Component\EventDispatcher\EventDispatcher;useSymfony\Component\HttpClient\HttpClient;// custom Symfony components// custom Symfony componentsclassUser{publicint$age;publicstring$name;}// Call with custom model and execution mode$yourSymfonyClientInstance=HttpClient::create(['http_version'=>'2.0']);$yourSymfonyEventDispatcher=newSymfonyEventDispatcher(newEventDispatcher());$user=(newStructuredOutput(events:$yourSymfonyEventDispatcher))->using('openai')//->withDebugPreset('on')//->wiretap(fn($e) => $e->print())->withLLMConfigOverrides(['apiUrl'=>'https://api.openai.com/v1'])->withClientInstance(driverName:'symfony',clientInstance:$yourSymfonyClientInstance)->withMessages("Our user Jason is 25 years old.")->withResponseClass(User::class)->withOutputMode(OutputMode::Tools)//->withStreaming()->get();dump($user);assert(isset($user->name));assert(isset($user->age));?>