From 336743f7473de1237f26ee0fe1e6c2f2b0076577 Mon Sep 17 00:00:00 2001 From: Twisha Bansal Date: Tue, 3 Feb 2026 16:38:38 +0530 Subject: [PATCH] add more test case + remove flaky test --- docs/en/samples/pre_post_processing/golden.txt | 3 +-- .../samples/pre_post_processing/python/langchain/agent.py | 8 ++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/en/samples/pre_post_processing/golden.txt b/docs/en/samples/pre_post_processing/golden.txt index 532a72fade..5ee773d450 100644 --- a/docs/en/samples/pre_post_processing/golden.txt +++ b/docs/en/samples/pre_post_processing/golden.txt @@ -1,5 +1,4 @@ Final Client Response: AI: -Booking Confirmed Loyalty Points -POLICY CHECK: Intercepting 'update-hotel' +POLICY CHECK: Intercepting 'update-hotel' \ No newline at end of file diff --git a/docs/en/samples/pre_post_processing/python/langchain/agent.py b/docs/en/samples/pre_post_processing/python/langchain/agent.py index b045e9af17..f6bd88cf5c 100644 --- a/docs/en/samples/pre_post_processing/python/langchain/agent.py +++ b/docs/en/samples/pre_post_processing/python/langchain/agent.py @@ -106,6 +106,14 @@ async def main(): last_ai_msg = response["messages"][-1].content print(f"AI: {last_ai_msg}") + # Test Pre-processing + print("-" * 50) + user_input = "Update booking for hotel 3 with checkin 2025-01-01 and checkout 2025-01-20" + response = await agent.ainvoke( + {"messages": [{"role": "user", "content": user_input}]} + ) + print(f"AI: {response['messages'][-1].content}") + if __name__ == "__main__": asyncio.run(main())