mirror of
https://github.com/karpathy/nanochat.git
synced 2026-05-11 18:30:27 +00:00
Two bugs: (1) force-web-search toggle bypassed identity veto — 'who are u' with Search on hit Tavily and got personality-quiz garbage. Now we always check _is_identity_or_meta() which covers identity, creator, samosaChaat references AND greetings (hi/hello/hey/what's up) before honoring the force toggle. (2) Model ignored injected Tavily result and answered from training priors (e.g. generic VP bio instead of specific Armenia/Iran facts). Added a grounding suffix after <|output_end|> ('Based on the search results above, ' for web_search, 'The result is ' for calculator) so the model's next tokens condition on the fresh tool output instead of spinning up memory.
|
||
|---|---|---|
| .. | ||
| _model.py | ||
| _query_classifier.py | ||
| _tokenizer.py | ||
| _tools.py | ||
| serve.py | ||