Skip to content

Commit 50e86ef

Browse files
authored
Update builder with updates from 0.3.0 SDK (#39)
+ set minimum sdk version to be 0.3.0 Co-authored-by: Mackenzie Zastrow <zastrowm@users.noreply.github.com>
1 parent 7388529 commit 50e86ef

File tree

5 files changed

+7
-13
lines changed

5 files changed

+7
-13
lines changed

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ classifiers = [
2626
"Topic :: Software Development :: Libraries :: Python Modules",
2727
]
2828
dependencies = [
29-
"strands-agents[ollama]>=0.1.0,<1.0.0",
29+
"strands-agents[ollama]>=0.3.0,<1.0.0",
3030
"strands-agents-tools>=0.1.0,<1.0.0",
3131
"rich>=14.0.0,<15.0.0",
3232
"prompt_toolkit>=3.0.51,<4.0.0",
@@ -50,6 +50,7 @@ dev = [
5050
"hatch>=1.0.0,<2.0.0",
5151
"mypy>=1.0.0,<2.0.0",
5252
"pre-commit>=3.2.0,<4.2.0",
53+
"pytest>=7.0.0",
5354
"ruff>=0.4.4,<1.0.0",
5455
]
5556
docs = [

src/strands_agents_builder/models/bedrock.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
"""Create instance of SDK's Bedrock model provider."""
22

33
from botocore.config import Config as BotocoreConfig
4-
from strands.models import BedrockModel
5-
from strands.types.models import Model
4+
from strands.models import BedrockModel, Model
65
from typing_extensions import Unpack
76

87

src/strands_agents_builder/models/ollama.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
from typing import Optional
44

5+
from strands.models import Model
56
from strands.models.ollama import OllamaModel
6-
from strands.types.models import Model
77
from typing_extensions import Unpack
88

99

src/strands_agents_builder/utils/model_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from typing import Any
88

99
from botocore.config import Config
10-
from strands.types.models import Model
10+
from strands.models import Model
1111

1212
# Default model configuration
1313
DEFAULT_MODEL_CONFIG = {

tests/tools/test_strand.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ def test_strand_with_query(self):
3737
def test_strand_empty_query(self):
3838
"""Test handling of empty query"""
3939
# Call the strand tool with empty query
40-
tool_use = {"toolUseId": "test_id", "input": {"query": ""}}
41-
42-
result = strand(tool_use)
40+
result = strand(query="")
4341

4442
# Verify error response
4543
assert result["status"] == "error"
@@ -54,12 +52,8 @@ def test_strand_custom_system_prompt(self):
5452
mock_agent_instance.return_value = {"status": "success", "content": [{"text": "Agent response"}]}
5553

5654
# Call the strand tool with custom prompt
57-
tool_use = {
58-
"toolUseId": "test_id",
59-
"input": {"query": "test query", "system_prompt": "Custom system prompt"},
60-
}
6155
# Store result to validate return value
62-
result = strand(tool_use)
56+
result = strand(query="test query", system_prompt="Custom system prompt")
6357
assert result["status"] == "success"
6458

6559
# Verify agent was created with custom prompt

0 commit comments

Comments
 (0)