Botframework QnA机器人框架-如何使用诸如“á&引用;
在我的qna maker知识库中,我有: 问题: 你好 答复: 你好,玛丽亚 但我在机器人上得到了这个答案:你好,玛尔ía。我尝试了很多东西,但都没有结果Botframework QnA机器人框架-如何使用诸如“á&引用;,botframework,skype-for-business,qnamaker,Botframework,Skype For Business,Qnamaker,在我的qna maker知识库中,我有: 问题: 你好 答复: 你好,玛丽亚 但我在机器人上得到了这个答案:你好,玛尔ía。我尝试了很多东西,但都没有结果 谢谢。您可以使用下面的代码从QNA获得回复,并将其传递给代码 static void Main() { string unicodeString = "This string contains the unicode character Pi (\u03a0)"; // Create two diffe
谢谢。您可以使用下面的代码从QNA获得回复,并将其传递给代码
static void Main()
{
string unicodeString = "This string contains the unicode character Pi (\u03a0)";
// Create two different encodings.
Encoding ascii = Encoding.ASCII;
Encoding unicode = Encoding.Unicode;
// Convert the string into a byte array.
byte[] unicodeBytes = unicode.GetBytes(unicodeString);
// Perform the conversion from one encoding to the other.
byte[] asciiBytes = Encoding.Convert(unicode, ascii, unicodeBytes);
// Convert the new byte[] into a char[] and then into a string.
char[] asciiChars = new char[ascii.GetCharCount(asciiBytes, 0, asciiBytes.Length)];
ascii.GetChars(asciiBytes, 0, asciiBytes.Length, asciiChars, 0);
string asciiString = new string(asciiChars);
// Display the strings created before and after the conversion.
Console.WriteLine("Original string: {0}", unicodeString);
Console.WriteLine("Ascii converted string: {0}", asciiString);
}
如果您需要更多帮助,请务必告诉我您可以使用下面的代码,从QNA获得您的回复,并将其传递给代码
static void Main()
{
string unicodeString = "This string contains the unicode character Pi (\u03a0)";
// Create two different encodings.
Encoding ascii = Encoding.ASCII;
Encoding unicode = Encoding.Unicode;
// Convert the string into a byte array.
byte[] unicodeBytes = unicode.GetBytes(unicodeString);
// Perform the conversion from one encoding to the other.
byte[] asciiBytes = Encoding.Convert(unicode, ascii, unicodeBytes);
// Convert the new byte[] into a char[] and then into a string.
char[] asciiChars = new char[ascii.GetCharCount(asciiBytes, 0, asciiBytes.Length)];
ascii.GetChars(asciiBytes, 0, asciiBytes.Length, asciiChars, 0);
string asciiString = new string(asciiChars);
// Display the strings created before and after the conversion.
Console.WriteLine("Original string: {0}", unicodeString);
Console.WriteLine("Ascii converted string: {0}", asciiString);
}
如果您需要更多帮助,请务必告诉我我在这里创建了一个示例: 对我来说,它在所有渠道都有效。你不应该对口音有任何问题 知识库: 您可以在这里尝试: 如果代码中有任何内容对您没有意义,请告诉我 问候,,
Francisco我在这里创建了一个示例: 对我来说,它在所有渠道都有效。你不应该对口音有任何问题 知识库: 您可以在这里尝试: 如果代码中有任何内容对您没有意义,请告诉我 问候,,
Francisco您使用的是什么频道?skype for Business能否尝试使用Bot Framework Emulator?我想了解问题来自Bot Builder、QnAMaker或SfB频道。@FraciscoPonceGomez,只发生在messenger、skype for business等频道上。但在Bot框架中,emulator工作正常。您好@BrunoMarquez,我创建了一个Bot并试图重现您的错误,但我在使用Facebook时正确地看到了María,Skype或任何其他频道。此时,我将检查QnAMaker中是否正确创建了知识库。这是我的QnA知识库<代码>问答源你好,社论你好,玛丽亚社论你好代码>您使用的是什么频道?skype for Business您可以尝试使用Bot Framework Emulator吗?我想了解问题来自Bot Builder、QnAMaker或SfB频道。@FraciscoPonceGomez,只发生在messenger、skype for business等频道上。但在Bot框架中,emulator工作正常。您好@BrunoMarquez,我创建了一个Bot并试图重现您的错误,但我在使用Facebook时正确地看到了María,Skype或任何其他频道。此时,我将检查QnAMaker中是否正确创建了知识库。这是我的QnA知识库
问答源你好,编辑你好,玛丽亚编辑你好