Skip to content

Conversation

mdrxy
Copy link
Collaborator

@mdrxy mdrxy commented Aug 15, 2025

No description provided.

@mdrxy mdrxy requested a review from eyurtsev as a code owner August 15, 2025 17:46
Copy link

vercel bot commented Aug 15, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
langchain Ready Ready Preview Comment Sep 11, 2025 2:06am

@mdrxy mdrxy added the core Related to the package `langchain-core` label Aug 15, 2025
@mdrxy mdrxy added this to the v1 milestone Aug 15, 2025
@mdrxy mdrxy requested a review from Copilot August 15, 2025 17:46
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the deprecated example attribute from both AIMessage and HumanMessage classes. The attribute was previously marked as discouraged and ignored by most models, making it safe to remove for API cleanup.

Key changes:

  • Removed example field definition and documentation from both message classes
  • Removed validation logic for example field mismatches in AIMessageChunk concatenation
  • Updated all test expectations to exclude the example field from message objects

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
libs/core/langchain_core/messages/ai.py Removed example attribute definition and validation logic from AIMessage and AIMessageChunk
libs/core/langchain_core/messages/human.py Removed example attribute definition from HumanMessage
libs/core/tests/unit_tests/test_messages.py Updated tests to remove example field usage and validation
libs/core/tests/unit_tests/prompts/test_few_shot.py Updated expected message objects to exclude example field
libs/core/tests/unit_tests/prompts/test_chat.py Updated expected message objects to exclude example field
libs/core/tests/unit_tests/runnables/snapshots/test_graph.ambr Updated schema snapshots to remove example field
libs/core/tests/unit_tests/prompts/snapshots/test_chat.ambr Updated schema snapshots to remove example field
libs/langchain/tests/unit_tests/agents/test_agent.py Updated test expectations to exclude example field

Copy link

codspeed-hq bot commented Aug 15, 2025

CodSpeed WallTime Performance Report

Merging #32565 will not alter performance

Comparing mdrxy/rfc-remove-example (165febe) with wip-v1.0 (750a3ff)

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

@mdrxy mdrxy changed the title refactor(core): remove example attribute from AIMessage and HumanMessage refactor(core): remove example attribute from AIMessage and HumanMessage Aug 15, 2025
Copy link

codspeed-hq bot commented Aug 15, 2025

CodSpeed Instrumentation Performance Report

Merging #32565 will not alter performance

Comparing mdrxy/rfc-remove-example (165febe) with wip-v1.0 (750a3ff)

Summary

✅ 14 untouched benchmarks

@mdrxy mdrxy requested a review from ccurme August 21, 2025 21:50
@mdrxy mdrxy self-assigned this Sep 8, 2025
@mdrxy mdrxy mentioned this pull request Sep 8, 2025
13 tasks
@mdrxy mdrxy merged commit 5ef7d42 into wip-v1.0 Sep 11, 2025
73 of 74 checks passed
@mdrxy mdrxy deleted the mdrxy/rfc-remove-example branch September 11, 2025 02:01
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`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant