mirror of
https://github.com/karpathy/nanochat.git
synced 2026-05-15 12:17:33 +00:00
needs_calculator now extracts the actual expression from: bare arithmetic (900+100), verbal math (900 plus 100), percentage (17% tip on 45), with comma-stripping and whitespace normalization. serve.py wires it into the force-prefix path parallel to web_search — if no web-search trigger, check calculator, pre-seed real tool call + result so the model sees the grounded answer in context. |
||
|---|---|---|
| .. | ||
| _model.py | ||
| _query_classifier.py | ||
| _tokenizer.py | ||
| _tools.py | ||
| serve.py | ||