Skip to content

Commit b27ac7a

Browse files
committed
fix: Move AgentInput to types submodule
1 parent f028dc9 commit b27ac7a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/strands/agent/agent.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
Mapping,
2323
Optional,
2424
Type,
25-
TypeAlias,
2625
TypeVar,
2726
Union,
2827
cast,
@@ -51,7 +50,7 @@
5150
from ..tools.executors._executor import ToolExecutor
5251
from ..tools.registry import ToolRegistry
5352
from ..tools.watcher import ToolWatcher
54-
from ..types.content import ContentBlock, Message, Messages
53+
from ..types.content import AgentInput, ContentBlock, Message, Messages
5554
from ..types.exceptions import ContextWindowOverflowException
5655
from ..types.tools import ToolResult, ToolUse
5756
from ..types.traces import AttributeValue
@@ -67,8 +66,6 @@
6766
# TypeVar for generic structured output
6867
T = TypeVar("T", bound=BaseModel)
6968

70-
AgentInput: TypeAlias = str | list[ContentBlock] | Messages | None
71-
7269

7370
# Sentinel class and object to distinguish between explicit None and default parameter value
7471
class _DefaultCallbackHandlerSentinel:

src/strands/types/content.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- Bedrock docs: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_Types_Amazon_Bedrock_Runtime.html
77
"""
88

9-
from typing import Dict, List, Literal, Optional
9+
from typing import Dict, List, Literal, Optional, TypeAlias
1010

1111
from typing_extensions import TypedDict
1212

@@ -186,3 +186,6 @@ class Message(TypedDict):
186186

187187
Messages = List[Message]
188188
"""A list of messages representing a conversation."""
189+
190+
191+
AgentInput: TypeAlias = str | list[ContentBlock] | Messages | None

0 commit comments

Comments
 (0)