Skip to content

FIX Replace deprecated piece.role with piece.api_role in doc notebooks#1620

Merged
romanlutz merged 2 commits intomicrosoft:mainfrom
romanlutz:fix-role-in-docs
Apr 16, 2026
Merged

FIX Replace deprecated piece.role with piece.api_role in doc notebooks#1620
romanlutz merged 2 commits intomicrosoft:mainfrom
romanlutz:fix-role-in-docs

Conversation

@romanlutz
Copy link
Copy Markdown
Contributor

Summary

The .role\ property was removed from \MessagePiece\ in #1618. Two doc notebooks still referenced it, causing runtime errors when executed.

Changes

  • \doc/code/memory/5_advanced_memory.py\ + .ipynb\ — \prompt.role\ / \piece.role\ → \prompt.api_role\ / \piece.api_role\
  • \doc/code/targets/11_message_normalizer.py\ + .ipynb\ — \piece.role\ → \piece.api_role\
  • Removed stale deprecation warning outputs from ipynb cells

Testing

  • Integration test \ est_notebooks_memory[5_advanced_memory.ipynb]\ was failing; this fixes it.

romanlutz and others added 2 commits April 15, 2026 16:01
The .role property was removed from MessagePiece in microsoft#1618.
Update 5_advanced_memory and 11_message_normalizer docs to use
.api_role instead, and remove stale deprecation warning outputs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…izer

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@romanlutz romanlutz merged commit 71cc56e into microsoft:main Apr 16, 2026
39 checks passed
@romanlutz romanlutz deleted the fix-role-in-docs branch April 16, 2026 02:56
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