Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parent key #121

Merged
merged 7 commits into from
Mar 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions agentops/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ def __init__(self, api_key: Optional[str] = None,

# These handle the case where .init() is used with optionals, and one of these
# params are None, which is does not trigger the Optional default in the constructor
if not api_key and not environ.get('AGENTOPS_API_KEY'):
logging.warning("AgentOps: No API key provided - no data will be recorded.")
if not api_key:
api_key = environ.get("AGENTOPS_API_KEY")
if not api_key:
logging.warning("AgentOps: No API key provided - no data will be recorded.")
return

if not parent_key:
Expand Down