From a86ae60c875850510591c46c68ca641240a6f7e3 Mon Sep 17 00:00:00 2001 From: Better-Boy Date: Wed, 23 Oct 2024 19:49:57 +0530 Subject: [PATCH 1/2] Update minds.py --- minds/minds.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/minds/minds.py b/minds/minds.py index 4aaf68e..7eb9447 100644 --- a/minds/minds.py +++ b/minds/minds.py @@ -103,6 +103,10 @@ def update( if name is not None and name != self.name: self.name = name + refreshed_mind = self.client.get(self.name) + self.parameters = refreshed_mind.parameters + + def add_datasource(self, datasource: Datasource): """ Add datasource to mind From 5ea87ca6f212fd22163aec4739f0bda54d0694e5 Mon Sep 17 00:00:00 2001 From: Abhilash Date: Wed, 23 Oct 2024 19:57:59 +0530 Subject: [PATCH 2/2] fix for update mind --- minds/minds.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/minds/minds.py b/minds/minds.py index 7eb9447..860e273 100644 --- a/minds/minds.py +++ b/minds/minds.py @@ -35,7 +35,6 @@ def __init__( self.parameters = parameters self.created_at = created_at self.updated_at = updated_at - self.datasources = datasources def __repr__(self): @@ -100,12 +99,19 @@ 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.get(self.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): """