<?php
require 'examples/boot.php';
require_once dirname(__DIR__).'/Support.php';
use Cognesy\Tell\Tell;
use Cognesy\Tell\TellReasoningEffort;
use Cognesy\Tell\TellRequest;
$project = TellHarnessExample::project();
try {
$tell = Tell::testing($project, 'reasoned answer');
$tell->workspace()->initialize();
$configuration = $tell->workspace()->configuration();
$connection = $configuration->set('connection', 'deepseek', 0);
$model = $configuration->set(
'model',
'deepseek-v4-flash',
$connection->version,
);
$configuration->set('reasoningEffort', 'medium', $model->version);
$request = TellRequest::prompt('Answer with a short justification.')
->reasoningEffort(TellReasoningEffort::Low)
->durable();
$effective = $configuration->effective($request);
$result = $tell->run($request);
echo 'Effort: '.$effective->values['reasoningEffort']."\n";
echo 'Source: '.$effective->provenance['reasoningEffort']."\n";
echo trim($result->text())."\n";
assert($effective->values['reasoningEffort'] === 'low');
assert($effective->provenance['reasoningEffort'] === 'invocation');
assert(trim($result->text()) === 'reasoned answer');
} finally {
TellHarnessExample::remove($project);
}