Skip to content

Extends lm.inspect_history to print usage and reasoning content #8335

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nguyenhoan1988
Copy link

Enhanced the pretty_print_history function in lm.inspect_history to include:

Usage Details: Prints response usage information when available
Reasoning Content: Displays reasoning content from the response message if present.

@arnavsinghvi11
Copy link
Collaborator

Hi @nguyenhoan1988 , thanks for the PR! could this instead be supported like how we do image & audio in inspect_history rather than keeping a separate verbose flag? Also, we don't need to introduce new colors - all outputs should be green

Copy link
Collaborator

@chenmoneygithub chenmoneygithub left a 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!

I am not quite sure if usage on console print is useful, programmatically we do provide the Prediction.get_lm_usage() to get lm usage for the module call, and for a breakdown with good visual, we recommend using MLflow tracing.

Reasoning print is useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants