diff --git a/minds/minds.py b/minds/minds.py index 43ee967..99d151f 100644 --- a/minds/minds.py +++ b/minds/minds.py @@ -120,9 +120,20 @@ def update( f'/projects/{self.project}/minds/{self.name}', data=data ) + if name is not None and name != self.name: self.name = name + refreshed_mind = self.client.minds.get(self.name) + self.model_name = refreshed_mind.model_name + self.provider = refreshed_mind.provider + self.prompt_template = refreshed_mind.prompt_template + self.parameters = refreshed_mind.parameters + self.created_at = refreshed_mind.created_at + self.updated_at = refreshed_mind.updated_at + self.datasources = refreshed_mind.datasources + + def add_datasource(self, datasource: Datasource): """ Add datasource to mind