gpt4 book ai didi

azure - 在 LUIS.ai 中使用 Bing SpellChecker

转载 作者:行者123 更新时间:2023-12-03 03:38:52 25 4
gpt4 key购买 nike

我尝试提高 LUIS 意图预测的准确性。因为如果缺少一个字母就会导致 LUIS 产生错误的意图,就会出现问题。我用tutorial ,但在 LUIS 返回的 JSON 中仍然没有像 alteredQuery 这样的 promise key 。

期望:

  "query": "bouk me a fliht to kayro",
"prediction": {
"alteredQuery": "book me a flight to cairo",
"topIntent": "book a flight",
"intents": {
"book a flight": {
"score": 0.9480589
}
"None": {
"score": 0.0332136229
}
},
"entities": {}
}
}

现实:

  "query": "bouk me a fliht to kayro",
"prediction": {
"topIntent": "book a flight",
"intents": {
"book a flight": {
"score": 0.9480589
}
"None": {
"score": 0.0332136229
}
},
"entities": {}
}
}

这就是我的使用方式:

const luisConfig: LuisApplication = {
applicationId: [APP_ID_GOES_HERE],
endpointKey: [KEY_GOES_HERE],
endpoint: [ENDPOINT_GOES_HERE],
};

const recognizerOptions: LuisRecognizerOptionsV2 = {
apiVersion: 'v2',
bingSpellCheckSubscriptionKey: [KEY_GOES_HERE];
includeAllIntents: true,
log: true,
spellCheck: true,
log: true,
includeInstanceData: true
};

const luisRecognizer = new LuisRecognizer(luisConfig, recognizerOptions, true);

最佳答案

我也有同样的问题...如果我直接调用 API:

/luis/prediction/v3.0/apps/<xxxxx>/slots/production/predict?verbose=true&show-all-intents=false&log=true&subscription-key=<xxxxx>&mkt-bing-spell-check-key=<xxxxx>&query=gretings

响应没有对象“alteredQuery”。

我还尝试使用更多参数来获得相同的结果:

https://<xxxxx>.cognitiveservices.azure.com/luis/prediction/v3.0/apps/<xxxxx>/slots/production/predict?verbose=true&show-all-intents=false&log=true&subscription-key=<xxxxx>&spellCheck=true&mkt-bing-spell-check-key=<xxxxx>&bing-spell-check-subscription-key=<xxxxx>&query=gretings

如果我使用 Ocp-Apim-Subscription-Key header 直接调用 BING API,它们会正确响应:

https://api.bing.microsoft.com/v7.0/spellcheck?text=gretings

关于azure - 在 LUIS.ai 中使用 Bing SpellChecker,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72230124/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com