mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-03 18:00:21 +00:00
feat: add "Current Date:" label to timestamp prefix
Changes [Wed 2026-01-28 20:30 EST] to [Current Date: Wed 2026-01-28 20:30 EST]. Tested with qwen3-1.7B: even with DOW in the timestamp, the model ignored it and tried to compute the day using Zeller's Congruence. The "Current Date:" semantic label is widely present in training data and gives small models the best chance of recognizing the timestamp as authoritative context rather than metadata to parse. Cost: ~18 tokens per message. Prevents hallucination spirals that burn hundreds or thousands of tokens on date derivation.
This commit is contained in:
committed by
Tak Hoffman
parent
a6c68e8690
commit
b6c8c1e89d
@@ -163,7 +163,7 @@ describe("gateway agent handler", () => {
|
||||
await vi.waitFor(() => expect(mocks.agentCommand).toHaveBeenCalled());
|
||||
|
||||
const callArgs = mocks.agentCommand.mock.calls[0][0];
|
||||
expect(callArgs.message).toBe("[Wed 2026-01-28 20:30 EST] Is it the weekend?");
|
||||
expect(callArgs.message).toBe("[Current Date: Wed 2026-01-28 20:30 EST] Is it the weekend?");
|
||||
|
||||
mocks.loadConfigReturn = {};
|
||||
vi.useRealTimers();
|
||||
|
||||
Reference in New Issue
Block a user