Skip to content

Commit

Permalink
dont create multiple sessions on partner frameworks (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
bboynton97 authored Jul 18, 2024
1 parent 5c7cb7f commit 2bedb6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion agentops/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ def init(
)

# handle auto_start_session here so we can get the session object to return rather than client above
# if the client automatically starts a session from a partner framework don't start a second
session = None
if auto_start_session:
if auto_start_session and len(c.current_session_ids) == 0:
session = c.start_session(
tags=tags, config=c.config, inherited_session_id=inherited_session_id
)
Expand Down

0 comments on commit 2bedb6e

Please sign in to comment.