Skip to content

Commit

Permalink
return session id in start_session
Browse files Browse the repository at this point in the history
  • Loading branch information
bboynton97 committed Apr 18, 2024
1 parent 31dc447 commit 739b484
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion agentops/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def end_session(end_state: str,


def start_session(tags: Optional[List[str]] = None, config: Optional[Configuration] = None, inherited_session_id: Optional[str] = None):
Client().start_session(tags, config, inherited_session_id)
return Client().start_session(tags, config, inherited_session_id)


def record(event: Event | ErrorEvent):
Expand Down
2 changes: 2 additions & 0 deletions agentops/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ def start_session(self, tags: Optional[List[str]] = None, config: Optional[Confi
logging.info('View info on this session at https://app.agentops.ai/drilldown?session_id={}'
.format(self._session.session_id))

return self._session.session_id

def end_session(self,
end_state: str,
end_state_reason: Optional[str] = None,
Expand Down

0 comments on commit 739b484

Please sign in to comment.