nanochat/scripts
Jason Cox d291fce324
Implement OpenAI-compatible endpoints
This change adds OpenAI-compatible API endpoints to the nanochat web server, enabling seamless integration with existing OpenAI SDK clients and tools while maintaining backward compatibility with the original chat UI.

- Adds /v1/chat/completions route - supporting both streaming and non-streaming mode
- Adds /v1/models route - returns single model, "nanochat"
2025-12-10 22:11:35 -08:00
..
base_eval.py add explicit UTF-8 encoding 2025-11-03 21:27:12 +01:00
base_loss.py many small tweaks. base, eval, core work now i think 2025-10-16 15:46:18 -07:00
base_train.py fix: missing val_bpb on resume 2025-11-22 11:04:20 +08:00
chat_cli.py upgrading all other files to be able to use cpu/mps as well as cuda. various minor other changes ,e.g. changing max_iterations to num_iterations in sft script for consistency in naming 2025-10-20 10:15:17 -07:00
chat_eval.py fix typos 2025-11-14 11:20:25 +01:00
chat_rl.py typo fixes in scripts 2025-10-28 20:17:31 +01:00
chat_sft.py remove unneeded iter() 2025-11-20 15:14:56 -05:00
chat_web.py Implement OpenAI-compatible endpoints 2025-12-10 22:11:35 -08:00
mid_train.py Apply suggestion from @svlandeg for nicer looking comparison 2025-12-08 18:27:06 -08:00
tok_eval.py initial commit 2025-10-13 06:49:24 -07:00
tok_train.py initial commit 2025-10-13 06:49:24 -07:00