Skip to content

Commit

Permalink
adds missing docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
BWMac committed Jan 8, 2025
1 parent 84edb76 commit 88c6f06
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions synapseclient/models/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,12 @@ async def prompt(
"""
syn = Synapse.get_client(synapse_client=synapse_client)

# TODO: Iron this out. It's a little confusing.
if session_id:
if session_id not in self.sessions:
await self.get_session_async(session_id=session_id, synapse_client=syn)
else:
self.current_session = session_id
else:
if not self.current_session:
await self.start_session_async(synapse_client=syn)
Expand All @@ -440,4 +443,5 @@ async def prompt(
)
def get_chat_history(self) -> List[AgentPrompt]:
"""Gets the chat history for the current session."""
# TODO: Is this the best way to do this?
return self.sessions[self.current_session].chat_history

0 comments on commit 88c6f06

Please sign in to comment.