Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LUIS SDK azure vs container implementation #470

Closed
cedrox opened this issue Dec 26, 2019 · 3 comments
Closed

LUIS SDK azure vs container implementation #470

cedrox opened this issue Dec 26, 2019 · 3 comments

Comments

@cedrox
Copy link

cedrox commented Dec 26, 2019

Is your feature request related to a problem? Please describe.
When using the container version, you need to access web service. There is no SDK Abstraction as sdk version differ in webservice endpoints...
#424

The problem here is that prediction results are not the same...

Exemple in code :
Task pred;

            if (_config.UseLocalServices)
            {
                pred = GetPredictionFromEndpointAsync(_config.LuisAPIKey, _config.LuisContainerUrl, _config.LuisAppId, _config.LuisSlotName, question.ToLowerInvariant());
            }
            else
            {
                IList<DynamicList> dynamicLists = _luisFeedDynamicListService.LuisEntries.Select(e => new DynamicList(e.Key, RequestListExtensions.FromLuisEntries(e.Value))).ToList();
                var predictionRequest = new PredictionRequest(question.ToLowerInvariant(), null, null, dynamicLists);
               
                pred = _luisClient.Prediction.GetSlotPredictionAsync(
                   Guid.Parse(_config.LuisAppId),
                   slotName: _config.LuisSlotName,
                   predictionRequest,
                   verbose: true,
                   showAllIntents: true,
                   log: true);
            }

Describe the solution you'd like
The proper solution would be to change only the enpoint like this:
Version Azure
_luisClient = new LUISRuntimeClient(new ApiKeyServiceClientCredentials(_config.LuisAPIKey))
{
Endpoint = _config.LuisHostRegion
};

Version container
_luisClient = new LUISRuntimeClient(new MockCredentials())
{
Endpoint = "http://localhost:5010"
};

@lisaweixu
Copy link

Hello cedrox,

It looks that you are using the LUIS Runtime SDK. This is for Cognitive Speech SDK. I will try to find a channel that you can post your LUIS Runtime SDK questions.

Inside the Speech SDK, there is a IntentRecognizer that talks to the LUIS service as well. Check it out here.

@lisaweixu
Copy link

@cedrox
Copy link
Author

cedrox commented Dec 28, 2019

Thanks @lisaweixu for your advice.
Adding issue here : Azure-Samples/cognitive-services-language-understanding#28

@cedrox cedrox closed this as completed Dec 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants