From ec10549ae6e91175581bdb823a3eff2c2c310b76 Mon Sep 17 00:00:00 2001 From: Didier Durand Date: Thu, 17 Jul 2025 08:29:01 +0200 Subject: [PATCH] Fixing some typos in various texts --- .../conversation_manager/conversation_manager.py | 2 +- src/strands/multiagent/a2a/executor.py | 2 +- src/strands/session/repository_session_manager.py | 14 +++++++------- src/strands/types/session.py | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/strands/agent/conversation_manager/conversation_manager.py b/src/strands/agent/conversation_manager/conversation_manager.py index 8756a1022..2c1ee7847 100644 --- a/src/strands/agent/conversation_manager/conversation_manager.py +++ b/src/strands/agent/conversation_manager/conversation_manager.py @@ -36,7 +36,7 @@ def restore_from_session(self, state: dict[str, Any]) -> Optional[list[Message]] Args: state: Previous state of the conversation manager Returns: - Optional list of messages to prepend to the agents messages. By defualt returns None. + Optional list of messages to prepend to the agents messages. By default returns None. """ if state.get("__name__") != self.__class__.__name__: raise ValueError("Invalid conversation manager state.") diff --git a/src/strands/multiagent/a2a/executor.py b/src/strands/multiagent/a2a/executor.py index 00eb4764f..d65c64aff 100644 --- a/src/strands/multiagent/a2a/executor.py +++ b/src/strands/multiagent/a2a/executor.py @@ -4,7 +4,7 @@ to be used as an executor in the A2A protocol. It handles the execution of agent requests and the conversion of Strands Agent streamed responses to A2A events. -The A2A AgentExecutor ensures clients recieve responses for synchronous and +The A2A AgentExecutor ensures clients receive responses for synchronous and streamed requests to the A2AServer. """ diff --git a/src/strands/session/repository_session_manager.py b/src/strands/session/repository_session_manager.py index 487335ac9..18a6ac474 100644 --- a/src/strands/session/repository_session_manager.py +++ b/src/strands/session/repository_session_manager.py @@ -32,7 +32,7 @@ def __init__(self, session_id: str, session_repository: SessionRepository, **kwa Args: session_id: ID to use for the session. A new session with this id will be created if it does - not exist in the reposiory yet + not exist in the repository yet session_repository: Underlying session repository to use to store the sessions state. **kwargs: Additional keyword arguments for future extensibility. @@ -133,15 +133,15 @@ def initialize(self, agent: "Agent", **kwargs: Any) -> None: agent.state = AgentState(session_agent.state) # Restore the conversation manager to its previous state, and get the optional prepend messages - prepend_messsages = agent.conversation_manager.restore_from_session( + prepend_messages = agent.conversation_manager.restore_from_session( session_agent.conversation_manager_state ) - if prepend_messsages is None: - prepend_messsages = [] + if prepend_messages is None: + prepend_messages = [] # List the messages currently in the session, using an offset of the messages previously removed - # by the converstaion manager. + # by the conversation manager. session_messages = self.session_repository.list_messages( session_id=self.session_id, agent_id=agent.agent_id, @@ -150,5 +150,5 @@ def initialize(self, agent: "Agent", **kwargs: Any) -> None: if len(session_messages) > 0: self._latest_agent_message[agent.agent_id] = session_messages[-1] - # Resore the agents messages array including the optional prepend messages - agent.messages = prepend_messsages + [session_message.to_message() for session_message in session_messages] + # Restore the agents messages array including the optional prepend messages + agent.messages = prepend_messages + [session_message.to_message() for session_message in session_messages] diff --git a/src/strands/types/session.py b/src/strands/types/session.py index 259ab1171..e51816f74 100644 --- a/src/strands/types/session.py +++ b/src/strands/types/session.py @@ -125,7 +125,7 @@ def from_agent(cls, agent: "Agent") -> "SessionAgent": @classmethod def from_dict(cls, env: dict[str, Any]) -> "SessionAgent": - """Initialize a SessionAgent from a dictionary, ignoring keys that are not calss parameters.""" + """Initialize a SessionAgent from a dictionary, ignoring keys that are not class parameters.""" return cls(**{k: v for k, v in env.items() if k in inspect.signature(cls).parameters}) def to_dict(self) -> dict[str, Any]: @@ -144,7 +144,7 @@ class Session: @classmethod def from_dict(cls, env: dict[str, Any]) -> "Session": - """Initialize a Session from a dictionary, ignoring keys that are not calss parameters.""" + """Initialize a Session from a dictionary, ignoring keys that are not class parameters.""" return cls(**{k: v for k, v in env.items() if k in inspect.signature(cls).parameters}) def to_dict(self) -> dict[str, Any]: