Skip to content

Conversation

@antznette1
Copy link

  • Enhances pretty_repr(html=True) for prompt templates to improve readability in notebooks/docs.
  • Adds a consistent title via get_msg_title_repr.
  • Displays partial_variables (colored when html=True).
  • Applies to:
    • ChatPromptTemplate.pretty_repr
    • BaseStringMessagePromptTemplate.pretty_repr (shows partials from underlying prompt)
    • _StringImageMessagePromptTemplate.pretty_repr (aggregates partials across sub-prompts)

Lint and test

  • Ran make format, make lint, and make test locally for the modified package.
  • Added unit tests:
    • libs/core/tests/unit_tests/prompts/test_pretty_repr_chat.py
  • New tests validate text and HTML output including partials for ChatPromptTemplate.

@antznette1 antznette1 requested a review from eyurtsev as a code owner November 7, 2025 22:08
@github-actions github-actions bot added feature core Related to the package `langchain-core` labels Nov 7, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 7, 2025

CodSpeed Performance Report

Merging #33891 will not alter performance

Comparing antznette1:feat/pretty-repr-html-partials (c55e790) with master (52b1516)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

✅ 13 untouched
⏩ 21 skipped1

Footnotes

  1. 21 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@antznette1
Copy link
Author

antznette1 commented Nov 9, 2025

Hi @ccurme @eyurtsev @jarib @mdrxy .
Could you please review my PR when you are chanced?

@mdrxy mdrxy changed the title feat(core): enrich HTML pretty_repr for prompt templates and display partial variables feat(core): enrich HTML pretty_repr for prompt templates and display partial variables Nov 9, 2025
@github-actions github-actions bot added feature and removed feature labels Nov 9, 2025
@antznette1 antznette1 force-pushed the feat/pretty-repr-html-partials branch 2 times, most recently from 240bc29 to ea5f4f3 Compare November 12, 2025 10:51
@antznette1
Copy link
Author

antznette1 commented Nov 15, 2025

Hi @eyurtsev
Could you please review my PR when you are chanced?

@antznette1
Copy link
Author

Please, can an active maintainer review the PR when chanced?

@antznette1 antznette1 force-pushed the feat/pretty-repr-html-partials branch from 6bca87f to c55e790 Compare November 17, 2025 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Related to the package `langchain-core` feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant