static async Task DownloadKnowledgebase(QnAMaker client) { var xxx = await client.DownloadKnowledgeBase(); foreach (var item in xxx.qnaDocuments) { System.Console.WriteLine($"{item.id} - {item.source}"); System.Console.WriteLine("-------------------"); } }
static async Task ReplaceKnowledgebase(QnAMaker client) { var kbreplace = new KnowledgebaseReplace { qnaList = (await client.DownloadKnowledgeBase()).qnaDocuments }; foreach (var item in kbreplace.qnaList) { item.metadata = new List <Metadata>() { new Metadata() { name = "origem", value = "xpto" } }; } await client.ReplaceKnowledgebase(kbreplace); }