Skip to content

Commit

Permalink
moved to decorators
Browse files Browse the repository at this point in the history
  • Loading branch information
bboynton97 committed Jul 31, 2024
1 parent 07056da commit 525d946
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions agentops/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ def decorator(obj):

def new_init(self, *args, **kwargs):
try:
kwarg_name = kwargs.get("agentops_name", None)
if kwarg_name is not None:
self.agent_ops_agent_name = kwarg_name
del kwargs["agentops_name"]

original_init(self, *args, **kwargs)

if not Client().is_initialized:
Expand Down

0 comments on commit 525d946

Please sign in to comment.