fix(all): TRUE multicloud.

This commit is contained in:
Rodrigo Rodriguez 2024-08-26 19:03:46 -03:00
parent e5eb64b11d
commit a7be4850b7
2 changed files with 10 additions and 11 deletions

View file

@ -358,7 +358,8 @@ export class GBVMService extends GBService {
if (!min[connectionName]) { if (!min[connectionName]) {
GBLogEx.info(min, `Loading custom connection ${connectionName}...`); GBLogEx.info(min, `Loading custom connection ${connectionName}...`);
min[connectionName] = new Sequelize(storageName, username, password, sequelizeOptions); min[connectionName] = new Sequelize(storageName, username, password, sequelizeOptions);
min[`llmconnection`] = { if (connectionName === 'llm') {
min[`llm`] = {
type: dialect, type: dialect,
username, username,
database: storageName, database: storageName,
@ -366,6 +367,7 @@ export class GBVMService extends GBService {
}; };
} }
} }
}
if (!con) { if (!con) {
throw new Error(`Invalid connection specified: ${connectionName}.`); throw new Error(`Invalid connection specified: ${connectionName}.`);
@ -437,10 +439,7 @@ export class GBVMService extends GBService {
}); });
if (sync && shouldSync) { if (sync && shouldSync) {
GBLogEx.info( GBLogEx.info(min, `Syncing changes for TABLE ${connectionName} ${tableName} keyword (${min.botId})...`);
min,
`Syncing changes for TABLE ${connectionName} ${tableName} keyword (${min.botId})...`
);
await seq.sync({ await seq.sync({
alter: true, alter: true,

View file

@ -475,7 +475,7 @@ export class ChatServices {
question question
}); });
} else if (LLMMode === 'sql') { } else if (LLMMode === 'sql') {
const con = min[`llmconnection`]; const con = min[`llm`];
const dialect = con['storageDriver']; const dialect = con['storageDriver'];
const host = con['storageServer']; const host = con['storageServer'];