diff --git a/python/samples/02-agents/context_providers/azure_ai_foundry_memory.py b/python/samples/02-agents/context_providers/azure_ai_foundry_memory.py index fbbeb20b14..bb2401463e 100644 --- a/python/samples/02-agents/context_providers/azure_ai_foundry_memory.py +++ b/python/samples/02-agents/context_providers/azure_ai_foundry_memory.py @@ -96,8 +96,9 @@ async def main() -> None: default_options={"store": False}, ) as agent: try: - # note that we will use the service side storage, nor load messsages from the history provider, - # but we include it to demonstrate that it can be used alongside the Foundry provider for other use cases. + # note that we will use the service side storage and not load messages from the history + # provider, but we include it to demonstrate that it can be used alongside the Foundry + # provider for other use cases. session = agent.create_session() # First interaction - establish some preferences diff --git a/python/samples/02-agents/tools/function_tool_recover_from_failures.py b/python/samples/02-agents/tools/function_tool_recover_from_failures.py index 001f1805b5..bc3f71e3a2 100644 --- a/python/samples/02-agents/tools/function_tool_recover_from_failures.py +++ b/python/samples/02-agents/tools/function_tool_recover_from_failures.py @@ -13,7 +13,7 @@ """ Tool exceptions handled by returning the error for the agent to recover from. -Shows how a tool that throws an exception creates gracefull recovery and can keep going. +Shows how a tool that throws an exception creates graceful recovery and can keep going. The LLM decides whether to retry the call or to respond with something else, based on the exception. """ @@ -37,7 +37,7 @@ def safe_divide( try: result = a / b # Will raise ZeroDivisionError except ZeroDivisionError as exc: - print(f" Tool failed: with error: {exc}") + print(f" Tool failed with error: {exc}") raise return f"{a} / {b} = {result}" @@ -79,7 +79,7 @@ async def main(): Expected Output: ============================================================ Step 1: Call divide(10, 0) - tool raises exception - Tool failed: with error: division by zero + Tool failed with error: division by zero Response: Division by zero is undefined in standard arithmetic, so 10 ÷ 0 has no meaning. If you’re curious about limits: as x approaches 0 from the positive side, 10/x tends to +∞; from the negative side, diff --git a/python/samples/03-workflows/orchestrations/group_chat_simple_selector.py b/python/samples/03-workflows/orchestrations/group_chat_simple_selector.py index 07d8a195d8..9368cf6bad 100644 --- a/python/samples/03-workflows/orchestrations/group_chat_simple_selector.py +++ b/python/samples/03-workflows/orchestrations/group_chat_simple_selector.py @@ -62,8 +62,8 @@ async def main() -> None: instructions=( "You are a programming expert in a workgroup. " f"Your job is to review the answer provided by {expert.name} and point " - "out statements that are technically true but practically dangerous." - "If there is nothing woth pointing out, respond with 'The answer looks good to me.'" + "out statements that are technically true but practically dangerous. " + "If there is nothing worth pointing out, respond with 'The answer looks good to me.'" ), client=client, )