Provider-visible transcript accounting and compact-frame rendering.
This namespace is deliberately value-only: it does not mutate sessions, create heads, or restore vars. Session code owns those state transitions.
Provider-visible transcript accounting and compact-frame rendering. This namespace is deliberately value-only: it does not mutate sessions, create heads, or restore vars. Session code owns those state transitions.
(assess-request cfg role messages)Return nil when the model's context window is unknown; otherwise return an estimate/budget map for provider input messages.
Return nil when the model's context window is unknown; otherwise return an estimate/budget map for provider input messages.
(compaction-request-messages cfg
{:keys [session-id head-id messages turns evals
calls snapshots latest-snapshot]})Render the model-mediated compaction request from the current completed head view. The response to this request becomes the compact synthetic user message.
Render the model-mediated compaction request from the current completed head view. The response to this request becomes the compact synthetic user message.
(estimate-message-tokens message)(estimate-message-tokens policy message)(estimate-request-tokens messages)(estimate-request-tokens policy messages)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |