<?phprequire'examples/boot.php';useCognesy\Events\Dispatchers\SymfonyEventDispatcher;useCognesy\Http\Creation\HttpClientBuilder;useCognesy\Instructor\StructuredOutput;useCognesy\Instructor\StructuredOutputRuntime;useCognesy\Instructor\Enums\OutputMode;useCognesy\Polyglot\Inference\LLMProvider;useSymfony\Component\EventDispatcher\EventDispatcher;useSymfony\Component\HttpClient\HttpClient;useCognesy\Polyglot\Inference\Config\LLMConfig;// 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());$provider=LLMProvider::using('openai')->withConfigOverrides(['apiUrl'=>'https://api.openai.com/v1']);$customClient=(newHttpClientBuilder(events:$yourSymfonyEventDispatcher))->withClientInstance(driverName:'symfony',clientInstance:$yourSymfonyClientInstance,)->create();$user=(newStructuredOutput(runtime:StructuredOutputRuntime::fromProvider(provider:$provider,events:$yourSymfonyEventDispatcher,httpClient:$customClient,)->withOutputMode(OutputMode::Tools),))//->wiretap(fn($e) => $e->print())->withMessages("Our user Jason is 25 years old.")->withResponseClass(User::class)//->withStreaming()->get();dump($user);assert(isset($user->name));assert(isset($user->age));?>