Skip to content

Commit 920fe13

Browse files
author
Jarno Ensio Hakulinen
committed
update
1 parent b2f5d22 commit 920fe13

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

gui/conversation_sidebar.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ def load_assistant_list(self, ai_client_type : AIClientType):
410410
for name in assistant_names:
411411
if not self.assistant_client_manager.get_client(name):
412412
assistant_config : AssistantConfig = self.assistant_config_manager.get_config(name)
413+
assistant_config.config_folder = "config"
413414
if assistant_config.assistant_type == "assistant":
414415
assistant_client = AssistantClient.from_json(assistant_config.to_json(), self.main_window, self.main_window.connection_timeout)
415416
else:
@@ -434,7 +435,7 @@ def on_ai_client_type_changed(self, index):
434435
self.threadList.clear_files()
435436

436437
# Get the threads for the selected AI client type
437-
threads_client = ConversationThreadClient.get_instance(self._ai_client_type)
438+
threads_client = ConversationThreadClient.get_instance(self._ai_client_type, config_folder='config')
438439
threads = threads_client.get_conversation_threads()
439440
self.threadList.load_threads_with_attachments(threads)
440441
except Exception as e:

gui/main_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def initialize_variables(self):
8383
self.conversation_thread_clients : dict[AIClientType, ConversationThreadClient] = {}
8484
for ai_client_type in AIClientType:
8585
try:
86-
self.conversation_thread_clients[ai_client_type] = ConversationThreadClient.get_instance(ai_client_type)
86+
self.conversation_thread_clients[ai_client_type] = ConversationThreadClient.get_instance(ai_client_type, config_folder='config')
8787
except Exception as e:
8888
self.conversation_thread_clients[ai_client_type] = None
8989
logger.error(f"Error initializing conversation thread client for ai_client_type {ai_client_type.name}: {e}")

sdk/azure-ai-assistant/azure/ai/assistant/management/base_assistant_client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,15 @@ def _initialize_client(
5959
self._name = self._config_data["name"]
6060
self._ai_client_type = self._get_ai_client_type(self._config_data["ai_client_type"], async_mode)
6161
self._ai_client : Union[OpenAI, AsyncOpenAI, AzureOpenAI, AsyncAzureOpenAI] = self._get_ai_client(self._ai_client_type, **client_args)
62+
config_folder = None
63+
if "config_folder" in self._config_data:
64+
config_folder = self._config_data["config_folder"]
6265
if async_mode:
6366
self._callbacks = callbacks if callbacks is not None else AsyncAssistantClientCallbacks()
64-
self._conversation_thread_client = AsyncConversationThreadClient.get_instance(self._ai_client_type, config_folder=self._config_data["config_folder"])
67+
self._conversation_thread_client = AsyncConversationThreadClient.get_instance(self._ai_client_type, config_folder=config_folder)
6568
else:
6669
self._callbacks = callbacks if callbacks is not None else AssistantClientCallbacks()
67-
self._conversation_thread_client = ConversationThreadClient.get_instance(self._ai_client_type, config_folder=self._config_data["config_folder"])
70+
self._conversation_thread_client = ConversationThreadClient.get_instance(self._ai_client_type, config_folder=config_folder)
6871
self._functions = {}
6972
self._assistant_config = AssistantConfig.from_dict(self._config_data)
7073
self._cancel_run_requested = threading.Event()

0 commit comments

Comments
 (0)