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 23, 2025 01:04
@github-actions github-actions bot added core Related to the package `langchain-core` feature labels Nov 23, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 23, 2025

CodSpeed Performance Report

Merging #34073 will not alter performance

Comparing antznette1:feat/pretty-repr-html-partials (57683dc) with master (0915682)1

⚠️ 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 skipped2

Footnotes

  1. No successful run was found on master (f070217) during the generation of this report, so 0915682 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 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.

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