<?phprequire'examples/boot.php';useCognesy\Config\Dsn;useCognesy\Config\Env;useCognesy\Http\HttpClient;useCognesy\Messages\Messages;useCognesy\Polyglot\Inference\Config\LLMConfig;useCognesy\Polyglot\Inference\Inference;useCognesy\Polyglot\Inference\InferenceRuntime;useCognesy\Utils\Str;// check with default HTTP client facade$httpClient=HttpClient::default();$openAiApiKey=(string)Env::get('OPENAI_API_KEY','');$dsn="driver=openai,apiUrl=https://api.openai.com/v1,endpoint=/chat/completions,apiKey={$openAiApiKey},model=gpt-4.1-nano";$answer=Inference::fromRuntime(InferenceRuntime::fromConfig(config:LLMConfig::fromArray(Dsn::fromString($dsn)->toArray()),httpClient:$httpClient,))->withMessages(Messages::fromString('What is the capital of France'))->withMaxTokens(64)->get();echo"USER: What is capital of France\n";echo"ASSISTANT: $answer\n";assert(Str::contains($answer,'Paris'));?>