From 525d946e27fcb6679cb73a01bcb398988ea5c48e Mon Sep 17 00:00:00 2001 From: Braelyn Boynton Date: Wed, 31 Jul 2024 12:28:06 -0700 Subject: [PATCH] moved to decorators --- agentops/decorators.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/agentops/decorators.py b/agentops/decorators.py index 0ea961e84..ce0d40506 100644 --- a/agentops/decorators.py +++ b/agentops/decorators.py @@ -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: