- Notifications
You must be signed in to change notification settings - Fork308
feat(cli): add --verbose flag to chat command for detailed usage (#238)#250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
github-actionsbot commentedJun 17, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
All contributors have signed the CLA ✍️ ✅ |
YorkieDev commentedJun 17, 2025
I have read the CLA Document and I hereby sign the CLA |
yagil commentedJun 20, 2025
Thanks for the contribution! 🦾 Can you please show screenshots of what the output looks like when this is used? |
YorkieDev commentedJun 20, 2025
Think it might need a little polishing to make it better for a release candidate and I need to get |
ryan-the-crayon left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks for the PR! Left a couple comments.
src/subcommands/chat.ts Outdated
| }); | ||
| } | ||
| functiondisplayVerboseStats(stats:any,logger:any){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Please type those two parameters.
stats should be of typeLLMPredictionStats (from@lmstudio/lms-shared-types)
logger should be of typeSimpleLogger (from@lmstudio/lms-common)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Actioned.
src/subcommands/chat.ts Outdated
| if(stats.tokensPerSecond!==undefined){ | ||
| logger.info(` Tokens/Second:${stats.tokensPerSecond.toFixed(2)}`); | ||
| } | ||
| if(stats.numGpuLayers!==undefined){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This stat is currently not populated. Probably hide for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Actioned.
src/subcommands/chat.ts Outdated
| short:"s", | ||
| description:"Custom system prompt to use for the chat", | ||
| }), | ||
| verbose:flag({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
--verbose is one of the global flags in lms that enables debugging logging regarding connection, etc. Maybe--stats?
…ve emoji and GPU layers stat- Add proper types for displayVerboseStats function parameters- Rename --verbose flag to --stats to avoid conflict with global verbose flag- Add short flag -t for --stats- Remove emoji from stats output for cleaner appearance- Hide numGpuLayers stat as it's not currently populated
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Yagil Burowski <yagil@elementlabs.ai>
src/subcommands/chat.ts Outdated
| }), | ||
| stats:flag({ | ||
| long:"stats", | ||
| short:"t", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
maybe no short flag for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Actioned :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
still here fyi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
sorted, sorry!
src/subcommands/chat.ts Outdated
| } | ||
| functiondisplayVerboseStats(stats:LLMPredictionStats,logger:SimpleLogger){ | ||
| logger.info("\nPrediction Stats:"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
let's have 2 *\n here to create an empty buffer line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Actioned :)
159dff7 intolmstudio-ai:mainUh oh!
There was an error while loading.Please reload this page.
ryan-the-crayon commentedJun 20, 2025
Merged. Expecting to ship this in 0.3.17+7. Thanks for the contribution! |


Summary
Adds a
--verboseflag to thelms chatCLI command to improve output visibility and help users debug model behavior in terminal use cases.This directly addresses issue#238, where users requested better visibility into token-level stats when using
lms chat.Features
When
--verboseis passed, the CLI logs:Example
lms chat -p"Hello world" --verbose