Watch the reasoning as it is written, and hold the view where you put it
This commit is contained in:
@@ -936,10 +936,13 @@ while (($line = fgets($fh)) !== false) {
|
||||
$now = microtime(true);
|
||||
if ($now - $lastFlush >= $FLUSH_SEC) {
|
||||
$lastFlush = $now;
|
||||
// thinking_chars rather than the reasoning itself: with think on, nothing lands in
|
||||
// content for ~15s, and a page that only watched partial would look hung.
|
||||
// The reasoning rides along as well as its length. The count alone is what keeps the
|
||||
// phase line honest during the ~15s before any content lands; the text is what the
|
||||
// page shows when the operator has asked to watch it happen. Both are cheap here —
|
||||
// the job file is tmpfs and the poll is a loopback request.
|
||||
jw($jobFile, ['status' => 'generating',
|
||||
'partial' => $answer,
|
||||
'thinking' => $thinking,
|
||||
'thinking_chars' => strlen($thinking),
|
||||
'sources' => $sources]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user