My custom action class has an attribute that is set based on the tracker. However I noticed that when action-server is simultaneously running this custom action for different conversations, this attribute gets overridden, as if both actions are run with the same instance of this custom action class. Is my speculation correct?
Code snippet:
class ActionRunLLM(Action):
def __init__(self) -> None:
self.llm_state = None
def name(self) -> Text:
return "action_run_llm"
def other_method(self):
llm_state = self.llm_state
# do something with llm_state
async def run(
self,
dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any],
) -> List[Dict[Text, Any]]:
self.llm_state = tracker.get_slot("llm_state")
self.other_method()
return []