- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.5k
Description
Feature Description
- Ability to run llama-cliin chat (conversation) mode automatically if there is a built-in chat template
- Having commands like /regen,/readfile, etc (demo in main : add new feature: special commands #10145)
Motivation
Inspired by my first attempt at adding commands to llama-cli, it seems that main.cpp is a bit too complex for a chat-based application.
Now, you might ask: don’t we already have llama-run and simple-chat for that? True, but the issue is that these examples are largely standalone - they don’t rely on common.cpp.
Given that most users are already familiar with llama-cli, enhancing the chat UX within it could benefit a majority of users, including those who don’t actively follow llama.cpp’s development. This approach is similar to what we did with the updated UI for llama-server: a seamless, drop-in replacement that eliminates the need for users to change their workflows.
Possible Implementation
One way to do is to split all the chat-related logic into main/chat.hpp, then call it from main.cpp, see #11203
CC @ggerganov and @slaren for discussion, thanks!