From 2d07f13c78f75de83ebdfad0a3cfbd730c5ff622 Mon Sep 17 00:00:00 2001 From: Brandon Ruffridge Date: Fri, 8 Nov 2024 16:23:07 -0500 Subject: [PATCH] set config to the openAI.assistant object, not the stringified copy that omits the function_handler function. --- component/src/services/openAI/assistant/openAIAssistantIO.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/component/src/services/openAI/assistant/openAIAssistantIO.ts b/component/src/services/openAI/assistant/openAIAssistantIO.ts index c11d5e7ed..3b5341d2b 100644 --- a/component/src/services/openAI/assistant/openAIAssistantIO.ts +++ b/component/src/services/openAI/assistant/openAIAssistantIO.ts @@ -20,7 +20,7 @@ export class OpenAIAssistantIO extends OpenAIAssistantIOI { constructor(deepChat: DeepChat) { const directConnectionCopy = JSON.parse(JSON.stringify(deepChat.directConnection)) as DirectConnection; const apiKey = directConnectionCopy.openAI; - const config = directConnectionCopy.openAI?.assistant; + const config = deepChat.directConnection?.openAI?.assistant; // prettier-ignore super(deepChat, config, OpenAIAssistantIO.URL_SEGMENTS, OpenAIUtils.buildKeyVerificationDetails(), OpenAIUtils.buildHeaders, apiKey);