From 6cfb701482259bed3fd2282f521cf3b9e3344c79 Mon Sep 17 00:00:00 2001 From: Braelyn Boynton Date: Fri, 24 May 2024 17:22:16 -0700 Subject: [PATCH 1/2] handle tag given as string --- agentops/client.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/agentops/client.py b/agentops/client.py index ff43387f..a1d4a549 100644 --- a/agentops/client.py +++ b/agentops/client.py @@ -157,6 +157,11 @@ def add_tags(self, tags: List[str]): tags (List[str]): The list of tags to append. """ + # if a string and not a list of strings + if not (isinstance(tags, list) and all(isinstance(item, str) for item in tags)): + if isinstance(tags, str): # if it's a single string + tags = [tags] # make it a list + if self._session: if self._session.tags is not None: for tag in tags: From 2e75c0eab7832b3bde728ca1620a48d4f9bbfbb2 Mon Sep 17 00:00:00 2001 From: Braelyn Boynton Date: Fri, 24 May 2024 17:24:18 -0700 Subject: [PATCH 2/2] autogen add framework --- agentops/partners/autogen_logger.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/agentops/partners/autogen_logger.py b/agentops/partners/autogen_logger.py index 6735e548..feba6844 100644 --- a/agentops/partners/autogen_logger.py +++ b/agentops/partners/autogen_logger.py @@ -31,6 +31,9 @@ class AutogenLogger(BaseLogger): agent_store: [{"agentops_id": str, "autogen_id": str}] = [] + def __init__(self): + agentops.add_tags(["autogen"]) + def start(self) -> str: pass