From 619a0e11b93f164ae439a9f7cff03481ac39970c Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Tue, 24 Jun 2025 14:54:28 -0300 Subject: [PATCH] fix(WhatsappDirectLine): update sendFileToDevice to default isViewOnce to true and clean up header example --- .forgejo/workflows/node.yaml | 7 ++---- packages/llm.gblib/services/ChatServices.ts | 26 ++++++--------------- 2 files changed, 9 insertions(+), 24 deletions(-) diff --git a/.forgejo/workflows/node.yaml b/.forgejo/workflows/node.yaml index 4758fb49..5130c996 100644 --- a/.forgejo/workflows/node.yaml +++ b/.forgejo/workflows/node.yaml @@ -30,7 +30,7 @@ jobs: sudo cp -r ./* /opt/gbo/bin/bot/botserver - - name: Install production dependencies in deployment location + - name: Building BotServer run: | echo "[General Bots Deployer] Building BotServer..." # rm -rf /opt/gbo/bin/bot/botserver/node_modules @@ -43,7 +43,4 @@ jobs: - name: Restart Bots Deployer run: | echo "[General Bots Deployer] Restarting..." - sudo systemctl stop bot - echo "[General Bots Deployer] Stopped." - sudo systemctl start bot - echo "[General Bots Deployer] Started." + lxc restart pragmatismo-bot diff --git a/packages/llm.gblib/services/ChatServices.ts b/packages/llm.gblib/services/ChatServices.ts index a2700d41..baafec0b 100644 --- a/packages/llm.gblib/services/ChatServices.ts +++ b/packages/llm.gblib/services/ChatServices.ts @@ -281,26 +281,14 @@ export class ChatServices { maxRetries: 2, }); } else { + + + const azureOpenAIKey = process.env.AZURE_OPEN_AI_KEY; - const azureOpenAILLMModel = await (min.core as any)['getParam']( - min.instance, - 'Azure Open AI LLM Model', - null, - true - ); - const azureOpenAIVersion = await (min.core as any)['getParam'](min.instance, 'Azure Open AI Version', null, true); - const azureOpenAIApiInstanceName = await (min.core as any)['getParam']( - min.instance, - 'Azure Open AI Instance', - null, - true - ); - const azureOpenAIEndPoint = await (min.core as any)['getParam']( - min.instance, - 'Azure Open AI Endpoint', - null, - true - ); + const azureOpenAILLMModel = process.env.AZURE_OPEN_AI_LLM_MODEL; + const azureOpenAIVersion = process.env.AZURE_OPEN_AI_VERSION; + const azureOpenAIApiInstanceName = process.env.AZURE_OPEN_AI_INSTANCE; + const azureOpenAIEndPoint = process.env.AZURE_OPEN_AI_ENDPOINT; model = new ChatOpenAI({ azureOpenAIApiKey: azureOpenAIKey,