Skip to content

Commit

Permalink
dont add duplicate tags
Browse files Browse the repository at this point in the history
  • Loading branch information
bboynton97 committed May 2, 2024
1 parent 97ecd3a commit 76cad59
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion agentops/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ def add_tags(self, tags: List[str]):
tags (List[str]): The list of tags to append.
"""
if self._tags is not None:
self._tags.extend(tags)
for tag in tags:
if tag not in self._tags:
self._tags.append(tag)
else:
self._tags = tags

Expand Down

0 comments on commit 76cad59

Please sign in to comment.