From a7be4850b7da7a840aa59e07f6bba23d9e77b77a Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Mon, 26 Aug 2024 19:03:46 -0300 Subject: [PATCH] fix(all): TRUE multicloud. --- packages/basic.gblib/services/GBVMService.ts | 19 +++++++++---------- packages/llm.gblib/services/ChatServices.ts | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/packages/basic.gblib/services/GBVMService.ts b/packages/basic.gblib/services/GBVMService.ts index 16cd3aa4..effae1fd 100644 --- a/packages/basic.gblib/services/GBVMService.ts +++ b/packages/basic.gblib/services/GBVMService.ts @@ -358,12 +358,14 @@ export class GBVMService extends GBService { if (!min[connectionName]) { GBLogEx.info(min, `Loading custom connection ${connectionName}...`); min[connectionName] = new Sequelize(storageName, username, password, sequelizeOptions); - min[`llmconnection`] = { - type: dialect, - username, - database: storageName, - password - }; + if (connectionName === 'llm') { + min[`llm`] = { + type: dialect, + username, + database: storageName, + password + }; + } } } @@ -437,10 +439,7 @@ export class GBVMService extends GBService { }); if (sync && shouldSync) { - GBLogEx.info( - min, - `Syncing changes for TABLE ${connectionName} ${tableName} keyword (${min.botId})...` - ); + GBLogEx.info(min, `Syncing changes for TABLE ${connectionName} ${tableName} keyword (${min.botId})...`); await seq.sync({ alter: true, diff --git a/packages/llm.gblib/services/ChatServices.ts b/packages/llm.gblib/services/ChatServices.ts index 2121d55a..728041f2 100644 --- a/packages/llm.gblib/services/ChatServices.ts +++ b/packages/llm.gblib/services/ChatServices.ts @@ -475,7 +475,7 @@ export class ChatServices { question }); } else if (LLMMode === 'sql') { - const con = min[`llmconnection`]; + const con = min[`llm`]; const dialect = con['storageDriver']; const host = con['storageServer'];