文件历史

提交图

4 次代码提交

作者 SHA1 备注 提交日期
Simon Willison d8ada58d32 Experimental prompt.display_reasoning mechanism
Test / test (ubuntu-latest, 3.14) (push) Has been cancelled
Test / test (windows-latest, 3.10) (push) Has been cancelled
Test / test (windows-latest, 3.11) (push) Has been cancelled
Test / test (windows-latest, 3.12) (push) Has been cancelled
Test / test (windows-latest, 3.13) (push) Has been cancelled
Test / test (windows-latest, 3.14) (push) Has been cancelled
Test / test (macos-latest, 3.10) (push) Has been cancelled
Test / test (macos-latest, 3.11) (push) Has been cancelled
Test / test (macos-latest, 3.12) (push) Has been cancelled
Test / test (macos-latest, 3.13) (push) Has been cancelled
Test / test (macos-latest, 3.14) (push) Has been cancelled
Test / test (ubuntu-latest, 3.10) (push) Has been cancelled
Test / test (ubuntu-latest, 3.11) (push) Has been cancelled
Test / test (ubuntu-latest, 3.12) (push) Has been cancelled
Test / test (ubuntu-latest, 3.13) (push) Has been cancelled
So you can turn off display reasoning and compatible plugins can then
opt not to request reasoning summaries from their models, even as
they do actually run reasoning.
2026-05-05 14:34:04 -07:00
Simon Willison 3497c22e8c Black 2026-04-28 16:48:48 -07:00
Simon Willison 65b8e37c79 Ran Black 2026-04-21 21:10:13 -07:00
Simon Willison c629c133b7 Phase 5: CLI reasoning display
Add a display_stream_events() helper (plus async twin) that writes
text events to stdout and reasoning events to stderr in dim style,
with a newline inserted at reasoning→text transitions so the
assistant's final answer starts on a fresh visual line.

Add -R / --no-reasoning flag to both `llm prompt` and `llm chat` to
suppress the stderr reasoning stream. The sync and async streaming
paths in `llm prompt` and the streaming path in `llm chat` now
consume response.stream_events() / astream_events() through the
helper instead of plain iteration.

Conftest: MockModel and AsyncMockModel now set can_stream = True so
CLI tests exercising event-level behavior actually take the
streaming branch. This matches the fixtures' practical behavior —
they yield chunks, one at a time.

With only the built-in OpenAI plugin upgraded (Phase 4), no model
currently streams live reasoning text (OpenAI's reasoning is
redacted — just a token count). The machinery is ready for
llm-anthropic / llm-gemini upgrades to light up the experience.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 09:44:17 -07:00