passepartout: v0.6.0 — Time Awareness
Level 2: symbolic-time-memory skill - memory-objects-since(timestamp) — hash-table walk, objects with version >= timestamp - memory-objects-in-range(since until) — version between two timestamps - context-query-with-time — extended query with :since :until - 6 tests, 100% pass Level 3: sensor-time skill - format-time-for-llm — TIME: section for system prompt (iso/natural format) - session-duration — session start tracking - sensor-time-tick — deadline scanning, cron-registered, 0 LLM tokens - TIME_AWARENESS / TIME_FORMAT / DEADLINE_WARNING_MINUTES env vars - 13 tests, 100% pass Level 1: TIME injection in think() (core-reason) - fboundp-guarded call to format-time-for-llm - session duration included when sensor-time skill loaded - Injected at top of system prompt in both token-economics and fallback paths Full suite: 135/135 (100%)
This commit is contained in:
@@ -44,8 +44,8 @@ heuristic from tokenizer.lisp). It persists across daemon restarts via
|
||||
(defun cost-track-call (provider prompt-text &optional response-text)
|
||||
"Compute and accumulate the cost of a single LLM call.
|
||||
Returns the cost of this call in USD."
|
||||
(let* ((input-tokens (count-tokens (or prompt-text "")))
|
||||
(output-tokens (if response-text (count-tokens response-text) 0))
|
||||
(let* ((input-tokens (funcall (symbol-function 'count-tokens) (or prompt-text "")))
|
||||
(output-tokens (if response-text (funcall (symbol-function 'count-tokens) response-text) 0))
|
||||
(total-tokens (+ input-tokens output-tokens))
|
||||
(cost (provider-token-cost provider total-tokens)))
|
||||
(bordeaux-threads:with-lock-held (*session-cost-lock*)
|
||||
|
||||
Reference in New Issue
Block a user