Skip to content

Commit e4a8a5d

Browse files
committed
fix: turn off model streaming
1 parent 78ba2c9 commit e4a8a5d

2 files changed

Lines changed: 18 additions & 10 deletions

File tree

e2e_tests/python/main.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
)
2020

2121
# Suppress boto3 credential info messages
22-
logging.getLogger('boto3').setLevel(logging.WARNING)
23-
logging.getLogger('botocore').setLevel(logging.WARNING)
24-
logging.getLogger('strands').setLevel(logging.WARNING)
22+
logging.getLogger("boto3").setLevel(logging.WARNING)
23+
logging.getLogger("botocore").setLevel(logging.WARNING)
24+
logging.getLogger("strands").setLevel(logging.WARNING)
2525

2626

2727
def load_config(file_path: str) -> dict[str, Any]:
@@ -59,11 +59,15 @@ def main() -> None:
5959
logging.info(f"Added OAuth server: {name}")
6060

6161
if not mcp_clients:
62-
raise RuntimeError("No MCP clients were successfully created. Cannot start chatbot without tools.")
62+
raise RuntimeError(
63+
"No MCP clients were successfully created. Cannot start chatbot without tools."
64+
)
6365

6466
# Create Bedrock model
6567
bedrock_model = BedrockModel(
66-
model_id="us.anthropic.claude-3-7-sonnet-20250219-v1:0", region_name="us-west-2"
68+
model_id="us.anthropic.claude-3-7-sonnet-20250219-v1:0",
69+
region_name="us-west-2",
70+
streaming=False,
6771
)
6872

6973
# Create agent with MCP tools

examples/chatbots/python/main.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
)
2020

2121
# Suppress boto3 credential info messages
22-
logging.getLogger('boto3').setLevel(logging.WARNING)
23-
logging.getLogger('botocore').setLevel(logging.WARNING)
24-
logging.getLogger('strands').setLevel(logging.WARNING)
22+
logging.getLogger("boto3").setLevel(logging.WARNING)
23+
logging.getLogger("botocore").setLevel(logging.WARNING)
24+
logging.getLogger("strands").setLevel(logging.WARNING)
2525

2626

2727
def load_config(file_path: str) -> dict[str, Any]:
@@ -58,11 +58,15 @@ def main() -> None:
5858
logging.info(f"Added OAuth server: {name}")
5959

6060
if not mcp_clients:
61-
raise RuntimeError("No MCP clients were successfully created. Cannot start chatbot without tools.")
61+
raise RuntimeError(
62+
"No MCP clients were successfully created. Cannot start chatbot without tools."
63+
)
6264

6365
# Create Bedrock model
6466
bedrock_model = BedrockModel(
65-
model_id="us.anthropic.claude-3-7-sonnet-20250219-v1:0", region_name="us-west-2"
67+
model_id="us.anthropic.claude-3-7-sonnet-20250219-v1:0",
68+
region_name="us-west-2",
69+
streaming=False,
6670
)
6771

6872
# Create agent with MCP tools

0 commit comments

Comments
 (0)