Skip to content

Commit 9313821

Browse files
author
Brian Sam-Bodden
authored
feat: rewrite middleware notebooks for Responses API coverage (#171)
* feat: rewrite middleware notebooks for Responses API coverage and fix ConversationMemory bug Rewrite all 4 middleware notebooks to demonstrate both Chat Completions and Responses API modes side-by-side. Each notebook now shows a two-model setup, uses format_content()/inspect_response() helpers to display readable text for both string and list-of-blocks content, and verifies provider ID stripping on cached content. Fix ConversationMemoryMiddleware failing to store Responses API messages due to SemanticMessageHistory requiring string content. Added _content_to_str() helper to normalize list-of-blocks content to plain strings before storage. New integration tests verify the fix with real Redis (no mocks). * fix: correct content block type check in test_memory_responses_api_recall The test checked for block type "output_text" but Responses API content blocks use type "text". Changed to check for "text" key presence instead, matching the format_content() pattern used elsewhere.
1 parent 74793bc commit 9313821

7 files changed

Lines changed: 7801 additions & 629 deletions

File tree

0 commit comments

Comments
 (0)