[英]Bot framework V4 Nodejs chat history logging
為了審核/歷史記錄,我必須在CosmosDB中記錄用戶與機器人的對話。 在使用.Net的V3中,我正在使用表記錄器模塊,如以下代碼所示。
builder.RegisterModule(new TableLoggerModule(account,chatHistoryTableName));
現在,我們將Bot升級/重寫為NodeJS中的V4。 請指導NodeJS中是否有針對V4的類似方法來保存整個對話?
此示例尚未合並: https : //github.com/Microsoft/BotBuilder-Samples/pull/1266
它使用AzureBlobTranscriptStore和TranscriptLoggerMiddleware
const { AzureBlobTranscriptStore } = require('botbuilder-azure');
const { TranscriptLoggerMiddleware } = require('botbuilder-core');
// Get blob service configuration as defined in .bot file
const blobStorageConfig = botConfig.findServiceByNameOrId(BLOB_CONFIGURATION);
// The transcript store has methods for saving and retrieving bot conversation transcripts.
let transcriptStore = new AzureBlobTranscriptStore({storageAccountOrConnectionString: blobStorageConfig.connectionString,
containerName: blobStorageConfig.container
});
// Create the middleware layer responsible for logging incoming and outgoing activities
// into the transcript store.
var transcriptMiddleware = new TranscriptLoggerMiddleware(transcriptStore);
adapter.use(transcriptMiddleware);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.