@@ -32,7 +32,7 @@ def __init__(self, session_id: str, session_repository: SessionRepository, **kwa
3232
3333 Args:
3434 session_id: ID to use for the session. A new session with this id will be created if it does
35- not exist in the reposiory yet
35+ not exist in the repository yet
3636 session_repository: Underlying session repository to use to store the sessions state.
3737 **kwargs: Additional keyword arguments for future extensibility.
3838
@@ -133,15 +133,15 @@ def initialize(self, agent: "Agent", **kwargs: Any) -> None:
133133 agent .state = AgentState (session_agent .state )
134134
135135 # Restore the conversation manager to its previous state, and get the optional prepend messages
136- prepend_messsages = agent .conversation_manager .restore_from_session (
136+ prepend_messages = agent .conversation_manager .restore_from_session (
137137 session_agent .conversation_manager_state
138138 )
139139
140- if prepend_messsages is None :
141- prepend_messsages = []
140+ if prepend_messages is None :
141+ prepend_messages = []
142142
143143 # List the messages currently in the session, using an offset of the messages previously removed
144- # by the converstaion manager.
144+ # by the conversation manager.
145145 session_messages = self .session_repository .list_messages (
146146 session_id = self .session_id ,
147147 agent_id = agent .agent_id ,
@@ -150,5 +150,5 @@ def initialize(self, agent: "Agent", **kwargs: Any) -> None:
150150 if len (session_messages ) > 0 :
151151 self ._latest_agent_message [agent .agent_id ] = session_messages [- 1 ]
152152
153- # Resore the agents messages array including the optional prepend messages
154- agent .messages = prepend_messsages + [session_message .to_message () for session_message in session_messages ]
153+ # Restore the agents messages array including the optional prepend messages
154+ agent .messages = prepend_messages + [session_message .to_message () for session_message in session_messages ]
0 commit comments