Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
<?php use Cognesy\Messages\Messages; use Cognesy\Polyglot\Inference\Inference; use Cognesy\Utils\Str; require 'examples/boot.php'; $answer = Inference::using('moonshot-kimi') ->with( messages: Messages::fromString('Reply with exactly: Paris'), options: ['max_tokens' => 128] ) ->get()->content()->toString(); echo "USER: What is capital of France\n"; echo "ASSISTANT: $answer\n"; assert(Str::contains($answer, 'Paris')); ?>