From 442def7fbb1381cb8b5aad01f2bcbd48779cc802 Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Tue, 27 Aug 2024 15:32:03 -0300 Subject: [PATCH] fix(all): TRUE multicloud. --- packages/llm.gblib/services/ChatServices.ts | 2 +- .../api-client.gbdialog/climate.vbs | 14 ++ .../msft-partner-center.bas | 117 +++++++++++++++++ .../api-client.gbdialog/partner-center.vbs | 121 ------------------ .../api-server.gbai/api.gbdialog/start.bas | 6 +- .../backup.gbdialog/backup-to-server.bas | 18 +++ .../backup.gbai/backup.gbdrive/sample.txt | 1 + templates/bi.gbai/bi.gbai/bi-admin.bas | 16 +++ templates/bi.gbai/bi.gbai/bi-user.bas | 11 ++ .../broadcast.gbdialog/broadcast.bas | 10 ++ .../default.gbdialog/backup-sharepoint.bas | 19 --- .../default.gbdialog/bi-conversational.bas | 42 ------ .../default.gbdialog/broadcast.bas | 10 -- .../default.gbdialog/cadastro-evento.bas | 16 --- .../default.gbdialog/create-event-sheet.bas | 17 +++ .../default.gbdialog/validate-email-list.bas | 12 -- .../default.gbkb/articles/about.md | 17 ++- .../default.gbkb/tabular/common-goodbye.tsv | Bin 2542 -> 1884 bytes .../default.gbkb/tabular/common-hello.tsv | Bin 1560 -> 702 bytes .../default.gbai/default.gbot/config.csv | 2 +- templates/edu.gbai/edu.gbdialog/start.bas | 76 +++++------ .../store.gbai/store.gbdialog/checkout.bas | 4 + .../talk-to-data.gbdata}/northwind.db | Bin .../whatsapp.gbai/whatsapp.gbdialog/send.bas | 1 + .../whatsapp.gbai/whatsapp.gbdialog/start.bas | 1 - .../whatsapp.gbkb/articles/newsletter-zap.txt | 2 + .../whatsapp.gbkb/images/logo-gb.png | Bin 0 -> 1451 bytes 27 files changed, 262 insertions(+), 273 deletions(-) create mode 100644 templates/api-client.gbai/api-client.gbdialog/climate.vbs create mode 100644 templates/api-client.gbai/api-client.gbdialog/msft-partner-center.bas delete mode 100644 templates/api-client.gbai/api-client.gbdialog/partner-center.vbs create mode 100644 templates/backup.gbai/backup.gbdialog/backup-to-server.bas create mode 100644 templates/backup.gbai/backup.gbdrive/sample.txt create mode 100644 templates/bi.gbai/bi.gbai/bi-admin.bas create mode 100644 templates/bi.gbai/bi.gbai/bi-user.bas create mode 100644 templates/broadcast.gbai/broadcast.gbdialog/broadcast.bas delete mode 100644 templates/default.gbai/default.gbdialog/backup-sharepoint.bas delete mode 100644 templates/default.gbai/default.gbdialog/bi-conversational.bas delete mode 100644 templates/default.gbai/default.gbdialog/broadcast.bas delete mode 100644 templates/default.gbai/default.gbdialog/cadastro-evento.bas create mode 100644 templates/default.gbai/default.gbdialog/create-event-sheet.bas delete mode 100644 templates/default.gbai/default.gbdialog/validate-email-list.bas rename templates/{default.gbai/default.gbdrive => talk-to-data.gbai/talk-to-data.gbdata}/northwind.db (100%) create mode 100644 templates/whatsapp.gbai/whatsapp.gbdialog/send.bas delete mode 100644 templates/whatsapp.gbai/whatsapp.gbdialog/start.bas create mode 100644 templates/whatsapp.gbai/whatsapp.gbkb/articles/newsletter-zap.txt create mode 100644 templates/whatsapp.gbai/whatsapp.gbkb/images/logo-gb.png diff --git a/packages/llm.gblib/services/ChatServices.ts b/packages/llm.gblib/services/ChatServices.ts index 25b9278a..dc2f74bc 100644 --- a/packages/llm.gblib/services/ChatServices.ts +++ b/packages/llm.gblib/services/ChatServices.ts @@ -492,7 +492,7 @@ export class ChatServices { }); } else { dataSource = new DataSource({ - type: dialect === 'mariadb'? 'mysql': dialect as any, + type: dialect === dialect as any, host: host, port: port, database: storageName, diff --git a/templates/api-client.gbai/api-client.gbdialog/climate.vbs b/templates/api-client.gbai/api-client.gbdialog/climate.vbs new file mode 100644 index 00000000..04229460 --- /dev/null +++ b/templates/api-client.gbai/api-client.gbdialog/climate.vbs @@ -0,0 +1,14 @@ +REM General Bots: Your Prompt Engineering Gets Done. +PARAM location AS "The city and state, e.g. San Francisco, CA" +PARAM unit AS "celsius", "fahrenheit" +DESCRIPTION "Get the current weather in a given location" + +REM 'TODO: Call your favorite wheather API here and return it to LLM. + +weather_info = NEW OBJECT +weather_info.location = location +weather_info. Temperature = "72" +weather_info. Unit = unit +weather_info. forecast = ["sunny", "windy"] + +RETURN weather_info \ No newline at end of file diff --git a/templates/api-client.gbai/api-client.gbdialog/msft-partner-center.bas b/templates/api-client.gbai/api-client.gbdialog/msft-partner-center.bas new file mode 100644 index 00000000..6f6a45e4 --- /dev/null +++ b/templates/api-client.gbai/api-client.gbdialog/msft-partner-center.bas @@ -0,0 +1,117 @@ +REM Set SCHEDULE "1 * * * * *" + +REM Obtém token Do Partner Center via token Do AD. + +Set HEADER "return-client-request-id" As "True" +Set HEADER "Content-Type" As "application/x-www-form-urlencoded; charset=utf-8" +REM pcToken = POST "https://login.microsoftonline.com/" + tenantId + "/oauth2/token", "resource=https%3A%2F%2Fgraph.windows.net&client_id=" + clientId + "&client_secret=" + clientSecret + "&grant_type=client_credentials" + +REM repara chamada de Billing. + +REM Set HEADER "Authorization" As "Bearer " + pcToken.access_token +Set HEADER "MS-Contract-Version" As "v1" +Set HEADER "MS-CorrelationId" As uuid() +Set HEADER "MS-RequestId" As uuid() +Set HEADER "MS-PartnerCenter-Application" As "VPN General Bots" +Set HEADER "X-Locale" As "en-US" + +REM Syncs Customers and Subscriptions. + +Set PAGE MODE "none" +list = Get host + "/v1/customers?size=20000" + +MERGE "Customers" With list.items BY "Id" + +FOR EACH item IN list + +subs = Get host + "/v1/customers/" + item.id + "/subscriptions" + MERGE "Subscriptions" With subs.items BY "Id" + END For + + REM Check period. + + If today = dueDay Then + If period = "previous" And Not CONTINUATION TOKEN Then + period = "current" + Else + period = "previous" + End If + Else + period = "current" + End If + + REM Perform the Call And Loop through the billing items. + + Set PAGE MODE "auto" + list = Get host + "/v1/invoices/unbilled/lineitems?provider=onetime&invoicelineitemtype=usagelineitems¤cycode=" + currency + "&period=previous&idparceiro=" + idparceiro + For EACH item IN list + SAVE "Billing", item.alternateId, item.availabilityId, item.billableQuantity, item.billingFrequency, item.chargeEndDate, item.chargeStartDate, item.chargeType, item.currency, item.customerCountry, item.customerDomainName, item.customerId, item.customerName, item.effectiveUnitPrice, item.invoiceNumber, item.meterDescription, item.mpnId, item.orderDate, item.orderId, item.partnerId, item.pCToBCExchangeRate, item.pCToBCExchangeRateDate, item.priceAdjustmentDescription, item.pricingCurrency, item.productId, item.productName, item.publisherId, item.publisherName, item.quantity, item.resellerMpnId, item.reservationOrderId, item.skuId, item.skuName, item.subscriptionDescription, item.subscriptionId, item.subtotal, item.taxTotal, item.termAndBillingCycle, item.totalForCustomer, item.unitPrice, item.unitType + END For + +END FOR + +TABLE Billing + CustomerId Customers + ResourceGroup string(200) + ResourceUri string(1000) + Tags string(max) + AdditionalInfo string(max) + ServiceInfo1 string(max) + ServiceInfo2 string(max) + CustomerCountry string(6) + MpnId string(50) + ResellerMpnId string(50) + ChargeType string(200) + UnitPrice* double + Quantity* double + UnitType string(max) + BillingPreTaxTotal double + BillingCurrency string(6) + PricingPreTaxTotal double + PricingCurrency string(6) + EntitlementId string(50) + EntitlementDescription string(400) + PCToBCExchangeRate double + PCToBCExchangeRateDate date + EffectiveUnitPrice* double + RateOfPartnerEarnedCredit double + ConsumedService string(200) + ResourceLocation string(100) + MeterRegion string(100) + PartnerId string(50) + PartnerName string(400) + CustomerName string(400) + CustomerDomainName string(400) + InvoiceNumber string(400) + ProductId string(50) + SkuId string(50) + AvailabilityId string(50) + SkuName string(200) + ProductName string(400) + PublisherName string(200) + PublisherId string(200) + SubscriptionId string(50) + SubscriptionDescription string(400) + ChargeStartDate* date + ChargeEndDate* date + UsageDate date + MeterType string(400) + MeterCategory string(100) + MeterId string(50) + MeterSubCategory string(100) + MeterName string(200) + UnitOfMeasure string(100) + Reprocess boolean +END TABLE + +TABLE Customers + TenantId guid + CompanyName string(100) + Id guid +END TABLE + +TABLE Subscriptions + CustomerId Customers + Id guid + OfferName string(50) +END TABLE \ No newline at end of file diff --git a/templates/api-client.gbai/api-client.gbdialog/partner-center.vbs b/templates/api-client.gbai/api-client.gbdialog/partner-center.vbs deleted file mode 100644 index 7a3111cb..00000000 --- a/templates/api-client.gbai/api-client.gbdialog/partner-center.vbs +++ /dev/null @@ -1,121 +0,0 @@ -REM SET SCHEDULE "1 * * * * *" - -REM Obtém token do Partner Center via token do AD. - -SET HEADER "return-client-request-id" AS "true" -SET HEADER "Content-Type" As "application/x-www-form-urlencoded; charset=utf-8" - -pcToken = POST "https://login.microsoftonline.com/" + tenantId + "/oauth2/token", "resource=https%3A%2F%2Fgraph.windows.net&client_id=" + clientId + "&client_secret=" + clientSecret + "&grant_type=client_credentials" - -REM repara chamada de Billing. - -SET HEADER "Authorization" AS "Bearer " + pcToken.access_token -SET HEADER "MS-Contract-Version" AS "v1" -SET HEADER "MS-CorrelationId" AS uuid() -SET HEADER "MS-RequestId" AS uuid() -SET HEADER "MS-PartnerCenter-Application" AS "General Bots" -SET HEADER "X-Locale" AS "en-US" - -REM Sincroniza Customers e Subscriptions - -SET PAGE MODE "none" -list = GET host + "/v1/customers?size=20000" -MERGE "Customers" WITH list.items BY "Id" - -FOR EACH item IN list - subs = GET host + "/v1/customers/" + item.id + "/subscriptions" - MERGE "Subscriptions" WITH subs.items BY "Id" -END FOR - - -REM Determina período. - -IF today = dueDay THEN - IF period = "previous" AND NOT CONTINUATION TOKEN THEN - period = "current" - ELSE - period = "previous" - END IF - ELSE - period = "current" -END IF - - - -REM Perform the call and loop through the billing items. - -SET PAGE MODE "auto" -list = GET host + "/v1/invoices/unbilled/lineitems?provider=onetime&invoicelineitemtype=usagelineitems¤cycode=" + currency + "&period=previous&idparceiro=" + idparceiro -FOR EACH item IN list - SAVE "Billing", item.alternateId, item.availabilityId, item.billableQuantity, item.billingFrequency, item.chargeEndDate, item.chargeStartDate, item.chargeType, item.currency, item.customerCountry, item.customerDomainName, item.customerId, item.customerName, item.effectiveUnitPrice, item.invoiceNumber, item.meterDescription, item.mpnId, item.orderDate, item.orderId, item.partnerId, item.pCToBCExchangeRate, item.pCToBCExchangeRateDate, item.priceAdjustmentDescription, item.pricingCurrency, item.productId, item.productName, item.publisherId, item.publisherName, item.quantity, item.resellerMpnId, item.reservationOrderId, item.skuId, item.skuName, item.subscriptionDescription, item.subscriptionId, item.subtotal, item.taxTotal, item.termAndBillingCycle, item.totalForCustomer, item.unitPrice, item.unitType -END FOR - - -TABLE Billing - CustomerId Customers - ResourceGroup string(200) - ResourceUri string(1000) - Tags string(max) - AdditionalInfo string(max) - ServiceInfo1 string(max) - ServiceInfo2 string(max) - CustomerCountry string(6) - MpnId string(50) - ResellerMpnId string(50) - ChargeType string(200) - UnitPrice* double - Quantity* double - UnitType string(max) - BillingPreTaxTotal double - BillingCurrency string(6) - PricingPreTaxTotal double - PricingCurrency string(6) - EntitlementId string(50) - EntitlementDescription string(400) - PCToBCExchangeRate double - PCToBCExchangeRateDate date - EffectiveUnitPrice* double - RateOfPartnerEarnedCredit double - ConsumedService string(200) - ResourceLocation string(100) - MeterRegion string(100) - PartnerId string(50) - PartnerName string(400) - CustomerName string(400) - CustomerDomainName string(400) - InvoiceNumber string(400) - ProductId string(50) - SkuId string(50) - AvailabilityId string(50) - SkuName string(200) - ProductName string(400) - PublisherName string(200) - PublisherId string(200) - SubscriptionId string(50) - SubscriptionDescription string(400) - ChargeStartDate* date - ChargeEndDate* date - UsageDate date - MeterType string(400) - MeterCategory string(100) - MeterId string(50) - MeterSubCategory string(100) - MeterName string(200) - UnitOfMeasure string(100) - Reprocess boolean -END TABLE - - -TABLE Customers - TenantId guid - CompanyName string(100) - Id guid -END TABLE - - -TABLE Subscriptions - CustomerId Customers - Id guid - OfferName string(50) -END TABLE - diff --git a/templates/api-server.gbai/api.gbdialog/start.bas b/templates/api-server.gbai/api.gbdialog/start.bas index 28e4ad82..be40e4a1 100644 --- a/templates/api-server.gbai/api.gbdialog/start.bas +++ b/templates/api-server.gbai/api.gbdialog/start.bas @@ -1,4 +1,4 @@ -REM 302 / 1234 + PARAM barraca AS number LIKE Código da barraca PARAM operador AS number LIKE Código do operador DESCRIPTION Esta função (tool) nunca é chamada pelo GPT. É um WebService do GB. @@ -7,11 +7,11 @@ REM Login como Garçom data = NEW OBJECT data.IdentificadorOperador = operador data.BarracaId = barraca -login = POST "https://api.server.com.br/api/Operadores/Login", data +login = POST host + "/login", data SET HEADER "Authorization" AS login.accessToken REM Obter o cardápio da Barraca - Utilizar o token recuperado acima. -data = GET "https://api.server.com.br/api/Item/Barraca/${barraca}/Cliente" +data = GET host + "/Barraca/${barraca}" produtos = NEW ARRAY FOR EACH item IN data[0].itens diff --git a/templates/backup.gbai/backup.gbdialog/backup-to-server.bas b/templates/backup.gbai/backup.gbdialog/backup-to-server.bas new file mode 100644 index 00000000..57a2c91b --- /dev/null +++ b/templates/backup.gbai/backup.gbdialog/backup-to-server.bas @@ -0,0 +1,18 @@ +list = DIR "default.gbdrive" + +FOR EACH item IN list + TALK "Checking: " + item.name + oldDays = DATEDIFF date, item.modified, "day" + + IF oldDays > 3 THEN + TALK "The file ${item.name} will be archived as it is expired." + blob = UPLOAD item + TALK "Upload to server completed." + + SAVE "log.xlsx", "archived", today, now, item.path, item.name, item.size, item.modified, blob.md5 + DELETE item + TALK "File removed from storage." + ELSE + TALK "The file ${item.name} does not need to be archived." + END IF +NEXT diff --git a/templates/backup.gbai/backup.gbdrive/sample.txt b/templates/backup.gbai/backup.gbdrive/sample.txt new file mode 100644 index 00000000..204380d0 --- /dev/null +++ b/templates/backup.gbai/backup.gbdrive/sample.txt @@ -0,0 +1 @@ +This is to be backed up. \ No newline at end of file diff --git a/templates/bi.gbai/bi.gbai/bi-admin.bas b/templates/bi.gbai/bi.gbai/bi-admin.bas new file mode 100644 index 00000000..80c33bd0 --- /dev/null +++ b/templates/bi.gbai/bi.gbai/bi-admin.bas @@ -0,0 +1,16 @@ +REM SET SCHEDULE "1 * * * * *" + +billing = FIND "Orders" + +REM Monthly consumption of bars. + +data = SELECT SUM(UnitPrice * Quantity) as Value, MONTH(OrderDate)+'/'+YEAR(OrderDate) from billing GROUP BY MONTH(OrderDate), YEAR(OrderDate) +img = CHART "timseries", data +SEND FILE img, "Monthly Consumption" + +REM Product Category + +data = SELECT SUM(UnitPrice * Quantity) as Value, CategoryName from billing JOIN Products ON billing.ProductID = Products.ProductID JOIN Categories ON Products.CategoryID = Categories.CategoryID GROUP BY CategoryName +img = CHART "donut", data +SEND FILE img, "Product Category" + diff --git a/templates/bi.gbai/bi.gbai/bi-user.bas b/templates/bi.gbai/bi.gbai/bi-user.bas new file mode 100644 index 00000000..ed646e37 --- /dev/null +++ b/templates/bi.gbai/bi.gbai/bi-user.bas @@ -0,0 +1,11 @@ +REM Monthly consumption of bars (Individual sending to each customer) + +customers = FIND "Customers" +FOR EACH c IN customers + data = SELECT SUM(UnitPrice * Quantity) as Value, MONTH(OrderDate)+'/'+YEAR(OrderDate) from billing + JOIN Customers ON billing.CustomerID = Customers.CustomerID + GROUP BY MONTH(OrderDate), YEAR(OrderDate) + WHERE Customers.CustomerID = c.CustomerID + img = CHART "timseries", data + SEND FILE img, "Monthly Consumption" +END FOR diff --git a/templates/broadcast.gbai/broadcast.gbdialog/broadcast.bas b/templates/broadcast.gbai/broadcast.gbdialog/broadcast.bas new file mode 100644 index 00000000..48975cb6 --- /dev/null +++ b/templates/broadcast.gbai/broadcast.gbdialog/broadcast.bas @@ -0,0 +1,10 @@ +list = FIND "broadcast.csv" +index = 1 +DO WHILE index < UBOUND(list) + row = list[index] + TALK TO row.mobile, "Hi, " + row.name + ". How are you? How about *General Bots* deployed?" + WAIT 5 + SAVE "Log.xlsx", TODAY, NOW, USERNAME, FROM, row.mobile, row.name + index = index + 1 +LOOP +TALK "The broadcast has been sent." diff --git a/templates/default.gbai/default.gbdialog/backup-sharepoint.bas b/templates/default.gbai/default.gbdialog/backup-sharepoint.bas deleted file mode 100644 index e7f14003..00000000 --- a/templates/default.gbai/default.gbdialog/backup-sharepoint.bas +++ /dev/null @@ -1,19 +0,0 @@ -list = DIR "QCARobot.gbdrive" - -FOR EACH item IN list -TALK "Verificando: " + item.name -DEBUG item -oldDays = DATEDIFF date, item.modified, "day" - -IF oldDays > 3 THEN -TALK "O arquivo ${item.name} será arquivado, pois está expirado." -blob = UPLOAD item -TALK Upload para o Azure realizado. - -SAVE "log.xlsx", "archived",today,now, item.path, item.name, item.size, item.modified, blob.md5 -REM DELETE item -REM TALK Arquivo removido do SharePoint. -ELSE -TALK "O arquivo ${item.name} não precisa de arquivamento." -END IF -NEXT \ No newline at end of file diff --git a/templates/default.gbai/default.gbdialog/bi-conversational.bas b/templates/default.gbai/default.gbdialog/bi-conversational.bas deleted file mode 100644 index d6e3b16e..00000000 --- a/templates/default.gbai/default.gbdialog/bi-conversational.bas +++ /dev/null @@ -1,42 +0,0 @@ - -REM SET SCHEDULE "1 * * * * *" - -billing = FIND "Billing" - -REM Consumo Mensal de barras. - -data = SELECT SUM(effectiveUnitPrice) as Value, MONTH(usageDate)+'/'+YEAR(usageDate) from billing GROUP BY MONTH(date), YEAR(date) -img = CHART "timseries", data -SEND FILE img, "Consumo Mensal" - -REM Categoria do Produto - -data = SELECT SUM(effectiveUnitPrice) as Value, meterCategory from billing GROUP BY meterCategory -img = CHART "donut", data -SEND FILE img, "Categoria do Produto" - -REM Sub Categoria do Produto - -data = SELECT SUM(effectiveUnitPrice) as Value, meterSubCategory from billing GROUP BY meterCategory -img = CHART "donut", data -SEND FILE img, "Subcategoria do Produto" - -REM Nome do Produto (Resumido) -REM productName - -REM Região do Recurso -REM resourceLocation - -REM Grupo do Recurso -REM resourceGroup - - -REM Consumo Mensal de barras (Envio individual para cada cliente) - -customers = FIND "Customers" -FOR EACH c IN customers -data = SELECT SUM(effectiveUnitPrice) as Value, MONTH(usageDate)+'/'+YEAR(usageDate) from billing GROUP BY MONTH(date), YEAR(date) WHERE customerId = c.id -img = CHART "timseries", data -SEND FILE img, "Consumo Mensal" -END FOR - diff --git a/templates/default.gbai/default.gbdialog/broadcast.bas b/templates/default.gbai/default.gbdialog/broadcast.bas deleted file mode 100644 index f38e5626..00000000 --- a/templates/default.gbai/default.gbdialog/broadcast.bas +++ /dev/null @@ -1,10 +0,0 @@ -lista = find "broadcast.csv" -indice = 1 -do while indice < ubound(lista) - linha = lista[indice] - TALK TO linha.mobile, "Oi, " + linha.name + ". Tudo bem? How about *General Bots* deployed? " - wait 5 - save “Log.xlsx”, today, now, username, from,linha.mobile, linha.name -indice = indice + 1 -loop -talk “O envio foi realizado. “ diff --git a/templates/default.gbai/default.gbdialog/cadastro-evento.bas b/templates/default.gbai/default.gbdialog/cadastro-evento.bas deleted file mode 100644 index 23f81e34..00000000 --- a/templates/default.gbai/default.gbdialog/cadastro-evento.bas +++ /dev/null @@ -1,16 +0,0 @@ -TALK "Olá, por favor, qual seu nome completo?" -HEAR nome -TALK "Qual o seu email para contato? " -HEAR email -TALK "Qual o seu telefone para contato? " -HEAR telefone -TALK "Função? " -HEAR funcao -TALK "Qual empresa que estará representando? " -HEAR empresa -TALK "É freelancer?" -HEAR freelancer AS BOOLEAN -TALK "Você pretende participar do evento em qual cidade? " -HEAR cidade AS "São Paulo", "Rio de Janeiro" -TALK "Você deseja receber outras informações do mailing da Quanta?" -SAVE "pessoas.xlsx", nome, email, telefone, funcao, empresa, freelancer \ No newline at end of file diff --git a/templates/default.gbai/default.gbdialog/create-event-sheet.bas b/templates/default.gbai/default.gbdialog/create-event-sheet.bas new file mode 100644 index 00000000..cb0bf798 --- /dev/null +++ b/templates/default.gbai/default.gbdialog/create-event-sheet.bas @@ -0,0 +1,17 @@ +TALK "Hello, could you please tell me your full name?" +HEAR name +TALK "What is your contact email?" +HEAR email +TALK "What is your contact phone number?" +HEAR phone +TALK "Job title?" +HEAR job +TALK "Which company will you be representing?" +HEAR company +TALK "Are you a freelancer?" +HEAR freelancer AS BOOLEAN +TALK "Which city do you plan to attend the event in?" +HEAR city AS "São Paulo", "Rio de Janeiro" +TALK "Would you like to receive other information from Quanta's mailing list?" + +SAVE "event-guests.xlsx", name, email, phone, job, company, freelancer diff --git a/templates/default.gbai/default.gbdialog/validate-email-list.bas b/templates/default.gbai/default.gbdialog/validate-email-list.bas deleted file mode 100644 index fba7c312..00000000 --- a/templates/default.gbai/default.gbdialog/validate-email-list.bas +++ /dev/null @@ -1,12 +0,0 @@ -SET MAX LINES 1000 -list = FIND "Mailing Global.xlsx" -indice = 1 -do while indice < ubound(list) - row = list[indice] -valid = IS VALID row.email -indice = indice + 1 -IF valid THEN -Set "Mailing Global.xlsx", "B" + indice , "x" -END IF -loop -talk “Validate OK. “ diff --git a/templates/default.gbai/default.gbkb/articles/about.md b/templates/default.gbai/default.gbkb/articles/about.md index dd257863..51d552b2 100644 --- a/templates/default.gbai/default.gbkb/articles/about.md +++ b/templates/default.gbai/default.gbkb/articles/about.md @@ -1,16 +1,15 @@ -# Desenvolvimento Personalizado +# Custom Development -General Bots usa linguagem natural para entender o que as pessoas querem, facilitando o desenvolvimento de código. Quando alguém diz: "Preciso do relatório mensal" ou "Imprima o relatório do mês", General Bots entende o mesmo. Utilize o nosso desenvolvimento para estender a conversa com suas próprias regras e intenções. +General Bots uses natural language to understand what people want, making code development easier. When someone says, "I need the monthly report" or "Print the report for the month," General Bots understands the same thing. Use our development tools to extend the conversation with your own rules and intents. -# Descoberta +# Discovery -General Bots pode pró-ativamente sugerir suas habilidades para os usuários baseada no contexto, como solicitação de um pedido, envio de uma mensagem, agendamento de uma conferência telefônica ou qualquer ação definida na sua aplicação. +General Bots can proactively suggest its abilities to users based on context, such as requesting an order, sending a message, scheduling a conference call, or any action defined in your application. -# Torne pessoal +# Make it Personal -Entregue experiências únicas através do conhecimento que a General Bots possui sobre seus usuários e preferências, para ajudar a tomar decisões e apresentar sempre o melhor cenário. +Deliver unique experiences through the knowledge that General Bots has about your users and their preferences, helping to make decisions and always presenting the best scenario. -# Sem downloads adicionais - -A interface da sua aplicação é automaticamente integrada à General Bots, de modo que não seja necessário realizar download ou instalações. +# No Additional Downloads +Your application's interface is automatically integrated with General Bots, so there’s no need for additional downloads or installations. \ No newline at end of file diff --git a/templates/default.gbai/default.gbkb/tabular/common-goodbye.tsv b/templates/default.gbai/default.gbkb/tabular/common-goodbye.tsv index 68056eb86079c714863e08e1b1505b2e44b90a69..2146c01def3c7edca2f2846e6ef3678565bcab64 100644 GIT binary patch literal 1884 zcmcgs%WlFj5S%ko|G}JkvG|8_K|OJRA4o%h7D7tww#v`9opms=TU9;8Mkplf$Ii~| z*k7LpZ+OBBDwMD=(Ac6ygPLEKZ;dloRGhJRW_;pE!GD7fj<&eNgga$@?Ph1#@!ep< ztQ}YUw_i~9F5>};I~t;CtbdIuS51Ry0>mM^@EszLp9gEm{_d3P$hRijl3Z_Bg&}Ie z=SZb(cH9-2R@c4?YC%--jmFP8<9u^U(&2?;r|4MW_=tNdt>{d_-vsrDS1n^%H%s8G z2fXsvl3~f5Jy&1F-*et?OWM7BSJ`sdm7xz(6lshTk*Xds_+rOc-s&;fH<%iE{WrP zc~>*zyuLJ8V}d(4ln7{GFhz|eDy{{wbXHnf#^#)(4Bv_g@k<^|{IWu|t}bDsKX&w1wj zbSRUAuO r&$0ilB^&C-mL2FS)KqR)?W|s=-m0Ir`$vj5#QrZycNzhwpPcy(_np$5 diff --git a/templates/default.gbai/default.gbkb/tabular/common-hello.tsv b/templates/default.gbai/default.gbkb/tabular/common-hello.tsv index 97062e0d9fdd97522e3c8dbac6d53b787ed946b5..0437187802eb45dad852c50acac8ca528014d697 100644 GIT binary patch literal 702 zcmc(c%?^Sv5QOJ!;yaX+7s6|ZkD&toL|WxX+R?yw iPs8-Gu#JLk`|a9*`JI2t{!Tg95nbEOxmSJ7+!b%&Eq_!1 literal 1560 zcmd6nOK!qI5JYQBq};(~jeG?p0_$wJfB{Ew6qCd@a9)<-5Ws7H7{W(H8WzZsKkc5b z>gt-=Z3`_l(T5UERjN=&Z_4$hjJJ|!M?YjF{3(_4Jtq=#FSH_>>se2%wEV348|j_+ zC)e$@hOp3#%m5Bag*iTnM6xT;2*mFS(Xwk!ftIYDYD1)iRYsLx?vW>}7pht}$MtIk z)^z^}3}4ZAtq?Zto8KG;bQ?D+=1e4^@_8)u)U~ZR2Q6h{$0#o5i_$$XcQt!eZ-2ek zSC=mTn;nwrr?EpauhuGG=hbTEa(#6<^=sFb_w9Q^ doKNS{ez_Nl^RYv5F<+Ds`lOBWDQAkgd=KC<6X5^= diff --git a/templates/default.gbai/default.gbot/config.csv b/templates/default.gbai/default.gbot/config.csv index 9b4f5ca4..4b092678 100644 --- a/templates/default.gbai/default.gbot/config.csv +++ b/templates/default.gbai/default.gbot/config.csv @@ -47,7 +47,7 @@ Twitter Access Token, Twitter Access Token Secret, Twitter Consumer Key, Twitter Consumer Key Secret, -Website, +Website, https://www.iochpe.com.br/en Welcome Article, WhatsApp Admins, WhatsApp Group ID, diff --git a/templates/edu.gbai/edu.gbdialog/start.bas b/templates/edu.gbai/edu.gbdialog/start.bas index 0a1ef562..3a9b3606 100644 --- a/templates/edu.gbai/edu.gbdialog/start.bas +++ b/templates/edu.gbai/edu.gbdialog/start.bas @@ -1,47 +1,47 @@ -REM SEND FILE “colegioinovar.PNG” +REM SEND FILE “logo.png” SAVE “Log.xlsx”, from, mobile, today, now, "start" -TALK "Olá " + username + “, eu sou o *InovarBot*, uma inteligência artificial criada para facilitar o seu contato conosco (instituição de ensino) e auxiliar em seu crescimento/progresso/evolução educacional." +TALK "Olá " + username + “, eu sou o *Bot*. row = FIND “People.xlsx”, “mobile=” + from IF row = null THEN -TALK Verifiquei que é seu primeiro contato conosco por aqui. Vamos fazer o seu cadastro e realizar a matrícula logo em seguida. -TALK Por favor, me informe o seu *Nome Completo*: -HEAR nome AS NAME -TALK Qual a sua *data de nascimento*? Exemplo: 23/09/2001. -HEAR datanasc AS DATE -TALK Informe por favor, um *e-mail* pra contato. -HEAR email as EMAIL -TALK Por favor, me informe o seu *CPF* (apenas números). -HEAR cpf AS INTEGER -TALK Qual o *número do seu RG ou CNH* (apenas números, por favor)? -HEAR rg AS INTEGER -TALK Qual o *Órgão emissor* do seu RG ou CNH? -HEAR orgaorg -TALK Qual a *data de emissão* do seu *RG* ou *CNH*? Exemplo: 15/08/2007 -HEAR dataemite AS DATE -TALK Qual o seu endereço completo? -HEAR ender -TALK Pronto! Agora vamos realizar a matrícula do aluno.\n\nPor favor, me informe o *Nome Completo*: -HEAR nomealuno AS NAME -TALK Me informe o *CPF* (apenas números) do aluno: -HEAR cpfaluno as INTEGER -TALK Qual a *data de nascimento* do aluno? Exemplo: 07/03/2010 -HEAR datanascaluno AS DATE -TALK Qual o *RG* (apenas números) do aluno? -HEAR rgaluno AS DATE -TALK Qual o *Órgão Emissor* do documento? -HEAR orgaoaluno -TALK Qual o *Data de Emissão* do documento? -HEAR emissaoaluno AS DATE -TALK Qual o nome do responsável financeiro do aluno? -HEAR respfinaluno AS NAME -TALK Vou registrar agora estes dados, um instante por favor... -SAVE People.xlsx, id, from, nome, datanasc, email, cpf, rg, orgaorg, dataemite, ender, nomealuno, cpfaluno, datanascaluno -TALK "Pronto, + username + ! O cadastro foi realizado. Iremos entrar em contato. \n\nObrigado!" + TALK Verifiquei que é seu primeiro contato conosco por aqui. Vamos fazer o seu cadastro e realizar a matrícula logo em seguida. + TALK Por favor, me informe o seu *Nome Completo*: + HEAR nome AS NAME + TALK Qual a sua *data de nascimento*? Exemplo: 23/09/2001. + HEAR datanasc AS DATE + TALK Informe por favor, um *e-mail* pra contato. + HEAR email as EMAIL + TALK Por favor, me informe o seu *CPF* (apenas números). + HEAR cpf AS INTEGER + TALK Qual o *número do seu RG ou CNH* (apenas números, por favor)? + HEAR rg AS INTEGER + TALK Qual o *Órgão emissor* do seu RG ou CNH? + HEAR orgaorg + TALK Qual a *data de emissão* do seu *RG* ou *CNH*? Exemplo: 15/08/2007 + HEAR dataemite AS DATE + TALK Qual o seu endereço completo? + HEAR ender + TALK Pronto! Agora vamos realizar a matrícula do aluno.\n\nPor favor, me informe o *Nome Completo*: + HEAR nomealuno AS NAME + TALK Me informe o *CPF* (apenas números) do aluno: + HEAR cpfaluno as INTEGER + TALK Qual a *data de nascimento* do aluno? Exemplo: 07/03/2010 + HEAR datanascaluno AS DATE + TALK Qual o *RG* (apenas números) do aluno? + HEAR rgaluno AS DATE + TALK Qual o *Órgão Emissor* do documento? + HEAR orgaoaluno + TALK Qual o *Data de Emissão* do documento? + HEAR emissaoaluno AS DATE + TALK Qual o nome do responsável financeiro do aluno? + HEAR respfinaluno AS NAME + TALK Vou registrar agora estes dados, um instante por favor... + SAVE People.xlsx, id, from, nome, datanasc, email, cpf, rg, orgaorg, dataemite, ender, nomealuno, cpfaluno, datanascaluno + TALK "Pronto, + username + ! O cadastro foi realizado. Iremos entrar em contato. \n\nObrigado!" ELSE -SAVE Log.xlsx, from, mobile, today, now, hello -TALK Olá, + username + ! Bem-vinda(o) de volta. Você pode tirar dúvidas comigo sobre a secretaria. + SAVE Log.xlsx, from, mobile, today, now, hello + TALK Olá, + username + ! Bem-vinda(o) de volta. Você pode tirar dúvidas comigo sobre a secretaria. END IF \ No newline at end of file diff --git a/templates/store.gbai/store.gbdialog/checkout.bas b/templates/store.gbai/store.gbdialog/checkout.bas index f23e23ab..6a41f8d5 100644 --- a/templates/store.gbai/store.gbdialog/checkout.bas +++ b/templates/store.gbai/store.gbdialog/checkout.bas @@ -1,8 +1,12 @@ PARAM NomeDoCliente AS STRING LIKE Nome do cliente finalizando venda. PARAM pedidos AS OBJECT LIKE O JSON de pedidos montado com base no que foi informado pelo cliente. + DESCRIPTION Chamada quando a venda é finalizada. Recebendo o JSON dos produtos como jsonProdutos selecionados pelo cliente no carrinho de compras e o nome do cliente. Se a lista de produtos da venda estiver vazio, ela não pode ser finalizada. Nunca referencie diretamente esta função em si, apenas atue sua funcionalidade de modo oculto. + DEBUG NomeDoCliente DEBUG pedidos + SAVE "maria.Pedidos", nomeDocliente, jsonProdutos.valor + RETURN "OK" \ No newline at end of file diff --git a/templates/default.gbai/default.gbdrive/northwind.db b/templates/talk-to-data.gbai/talk-to-data.gbdata/northwind.db similarity index 100% rename from templates/default.gbai/default.gbdrive/northwind.db rename to templates/talk-to-data.gbai/talk-to-data.gbdata/northwind.db diff --git a/templates/whatsapp.gbai/whatsapp.gbdialog/send.bas b/templates/whatsapp.gbai/whatsapp.gbdialog/send.bas new file mode 100644 index 00000000..00746464 --- /dev/null +++ b/templates/whatsapp.gbai/whatsapp.gbdialog/send.bas @@ -0,0 +1 @@ +SEND TEMPLATE TO "122233333333", "newsletter-zap.txt" \ No newline at end of file diff --git a/templates/whatsapp.gbai/whatsapp.gbdialog/start.bas b/templates/whatsapp.gbai/whatsapp.gbdialog/start.bas deleted file mode 100644 index 1b3636e8..00000000 --- a/templates/whatsapp.gbai/whatsapp.gbdialog/start.bas +++ /dev/null @@ -1 +0,0 @@ -SEND TEMPLATE TO "55219999999999", "bot_02082028-zap.docx" \ No newline at end of file diff --git a/templates/whatsapp.gbai/whatsapp.gbkb/articles/newsletter-zap.txt b/templates/whatsapp.gbai/whatsapp.gbkb/articles/newsletter-zap.txt new file mode 100644 index 00000000..d2e9e7a7 --- /dev/null +++ b/templates/whatsapp.gbai/whatsapp.gbkb/articles/newsletter-zap.txt @@ -0,0 +1,2 @@ +logo-gb.png +Welcome to General Bots in WhatsApp templating system! \ No newline at end of file diff --git a/templates/whatsapp.gbai/whatsapp.gbkb/images/logo-gb.png b/templates/whatsapp.gbai/whatsapp.gbkb/images/logo-gb.png new file mode 100644 index 0000000000000000000000000000000000000000..8677bb92e3f079a6e36d8e74bbd80cb71008023a GIT binary patch literal 1451 zcmV;c1yuTpP)002A)1^@s6E@?-T00009a7bBm000XU z000XU0RWnu7ytkO8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?1vp7W zK~#9!>{>C58$}e|Gbye>x^=2_S-GM+Bd4H2adD|{DU1*erZIGJckVFVxie+bU@8z- z;7D{tuva4aglUmjoGt}AI~@{*nL%&F&)59*?0RkAnfcP!dB-z<=D+#>&7buhESJl` ziP&7MtG+KK-DyCaj|cKWN*T1lAe*vW7`(4xo47R1xVAV5ptO8bP2PKLIGzrxO4s ziSC~&Jy3du{#6@TX2CslHky(?4@mnJ+U8`pxXelayQKYs*`NTW&{j@>u3&Rc=57(6 z?vk~p@P)2%PJ%=O`iasD%>lkUfpau1PYOiV z6?|xsO{lT8rGky8h(NQ}Cv=l5EHzBtP6T5UfoumPrKHHZW^)Y~APs?gZ1YbtBCA2> zraoPxEfqGdLk^txEfnz@SUqN>mys_TkD!rrhYo#CV0a$;-pP!Y!Q)Xnn z0mE8;+mpyL{`|FT&eEaXR2s3i`UahkZX?0hQ9u2}IH9lf7o{_$@tU9vEp`&rN8?TL zYGp%FW#kBsX)=9`w)<;Fn6ahpj4)px&st756~UE~z!}4dz_P0!Dg9DN8I!I>rvR7i=vc;LlYdN z<#U9+kp*^`%L_!@f^gYsRv9C-&q#`Kc?DiHQF<)&dto^MjN_Ni(Op7hbuGKv7VJbq zWMu8GEn0P3oWp)xMr4%%R>Xj+JJ=gBXQCBpNJXb)xWay$jS0&DtFi{E_mO4^Y44J> zSaqUZvgf8yE6tE@CheLewI$J~HG&)(3&c#nPgokZbJ!0B@(+tf z)*Yd!{8Z^n(smCdspU{0#JsyU7D|DD6tTx^%%P+2ndMNaBg&{heb(pD`ZCjzP?s#S zBK%!A9{-XimgtPw&KHf`0BfY<+ZN7}r0o(}`U>$4i>yOLm-#%yZfI`!Lnub`RQs>M zTQqXs!&+iQ+`3noCe}^M33HKt$u8J`!naaOhnN+aK|xNLX7n4bIMuS0mJwq%eru

O@b*pQ(> z`a1z@WNCZsaB&R*!jXf`$g&}c17K}j;0+&MW&pUAi*$(g2vzoi@k3pxtQU-{V%ThF zoMuyYO3#G;w(CwT__UMj&Z;|HVkr@dlpCRCjs>wlbu9sQLGZlLv%ML(56*d*ah&HV zGDAyR8vDl%2g!|lQ>r=QV|F*A?Y|0dRb4iO^4v3azcjVe+jxyc4~ZM|@{jgO7+2XU z{1Ch{Do{5KEj8U#c*z%IO~Fm%tgNEY_0>%grSH?4ImVT8kuLjJ-#V@tvklELBClY! z@kj~ z{M&I+>cR5j!SY~vusm2EEDx3!50(eZgXO`xUGk3r0|4H3)E&cJ8$|#B002ovPDHLk FV1hs)sdNAU literal 0 HcmV?d00001