From b2f7375c64213cfb70df1682fd31e64de24e8277 Mon Sep 17 00:00:00 2001 From: Arsenii Shatokhin Date: Thu, 15 Aug 2024 09:05:33 +0400 Subject: [PATCH] Fix shared state initialization #165 --- agency_swarm/tools/BaseTool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agency_swarm/tools/BaseTool.py b/agency_swarm/tools/BaseTool.py index c0495642..c2927091 100644 --- a/agency_swarm/tools/BaseTool.py +++ b/agency_swarm/tools/BaseTool.py @@ -15,8 +15,8 @@ class BaseTool(OpenAISchema, ABC): def __init__(self, **kwargs): super().__init__(**kwargs) - if not self.shared_state: - self.shared_state = SharedState() + if not self.__class__.shared_state: + self.__class__.shared_state = SharedState() class ToolConfig: strict: bool = False