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())