I have a LUIS application which has multiple versions named, v1, v2, and v3.
v1 is used in Production slot; v2 is used in Staging Slot; v3 is still in development state.
LuisRecognizerOptionsV3 recognizerOptions = new LuisRecognizerOptionsV3(luisApplication)
{
TelemetryClient = telemetryClient,
IncludeAPIResults = true,
PredictionOptions = new Microsoft.Bot.Builder.AI.LuisV3.LuisPredictionOptions()
{
Version = "v3", // Just not seem to work. 404 exception.
IncludeInstanceData = true,
IncludeAllIntents = true,
PreferExternalEntities = true,
}
};
Is it possible to use the luis model version v3 without publishing to any slot?
Is it mandatory to use define both Slot and Version attributes?
I get 404 error incase if I use only version without publishing it to any slot.
Already the endpoints are made public in all versions but still error.
How to overcome these challenges?
Thanks,
pdeepa
Iterative app design for LUIS: https://learn.microsoft.com/en-us/azure/cognitive-services/LUIS/luis-concept-app-iteration
Trained versions aren't automatically available at your LUIS app's endpoint. You must publish or republish a version in order for it to be available at your LUIS app endpoint.
If more versions of the app need to be available at an endpoint, you should export the version and reimport it to a new app. The new app has a different app ID.
Related
I have a legacy application connected to cloud d365 that uses:
XrmServiceContext : Microsoft.Xrm.Client.CrmOrganizationServiceContext
from Microsoft.Xrm.Client namespace. It was downloaded from there back then. The connetion string looks like this:
"Url=https://org.api.crm4.dynamics.com/XRMServices/2011/Organization.svc;Username=unm;Password=pwd"
is the code affected by WS-Trust deprecation announced by MSFT?
Yes, definitely. You should switch to the following pattern:
targetString = string.Format("AuthType=OAuth;Username={0}; Password={1};Url={2};AppId=51f81489-12ee-4a9e-aaae-a2591f45987d; RedirectUri=app://58145B91-0C36-4500-8554-080854F2AC97;LoginPrompt=Disabled;RequireNewInstance=true", CRMUsername, CRMPassword, CRMAddress);
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
Note that those are the "default" AppId and RedirectURI and that in production environments you should register your app and use production values.
I'm trying to handle backwards compatibility with my GraphQL API.
We have on-premise servers that get periodically updated based off of when they connect to the internet. We have a Mobile app that talks to the on-premise server.
Problem
We get into an issue where the Mobile app is up to date and the on-premise server isn't. When a change in the Schema occurs, it causes issues.
Example
Product version 1
type Product {
name: String
}
Product version 2
type Product {
name: String
account: String
}
New version of mobile app asks for:
product(id: "12345") {
name
account
}
Because account is not valid in version 1, I get the error:
"Cannot query field \"account\" on type \"Product\"."
Does anyone know how I can avoid this issue so I don't recieve this particular error. I'm totally fine with account coming back with Null or just some other plan of attack for updating Schema's. But having it completely blow up with no response is not good
Your question did not specify what you're actually using on the backend. But it should be possible to customize the validation rules a GraphQL service uses in any implementation based on the JavaScript reference implementation. Here's how you do it in GraphQL.js:
const { execute, parse, specifiedRules, validate } = require('graphql')
const validationRules = specifiedRules.filter(rule => rule.name !== 'FieldsOnCorrectType')
const document = parse(someQuery)
const errors = validate(schema, document, validationRules)
const data = await execute({ schema, document })
By omitting the FieldsOnCorrectType rule, you won't get any errors and unrecognized fields will simply be left off the response.
But you really shouldn't do that.
Modifying the validation rules will result in spec-breaking changes to your server, which can cause issues with client libraries and other tools you use.
This issue really boils down to your deployment process. You should not push new versions of the client that depend on a newer version of the server API until that version is deployed to the server. Period. That would hold true regardless of whether you're using GraphQL, REST, SOAP, etc.
I have successfully set up push notification using firebase and linked it up Azure notification hub using this guide from the Microsoft docs:
https://learn.microsoft.com/en-us/azure/notification-hubs/xamarin-notification-hubs-push-notifications-android-gcm
However I am now trying to push notification to specific devices using tags. There isn't currently a xamarin c# document. I have done some research around the area and found people solving what seems to be the same problem using dependency injection (which feels a little complex?). I have also found these two questions/answers:
How to push notification to specific users in Xamarin.Forms Android?
https://forums.xamarin.com/discussion/85935/how-to-push-notification-to-specific-users-in-xamarin-forms-android
Both of which point to the method "OnRegistered" which i don't seem to have? i've had another look through the documentation I followed to set up notifications in the first place and I seem to have followed it correctly?
I have the following code for android:
private void SendRegistrationToServer(string token)
{
// Register with Notification Hubs
hub = new NotificationHub(ApplicationConstants.NotificationHubName,
ApplicationConstants.ListenConnectionString, this);
var tags = new List<string>() { };
var regID = hub.Register(token, tags.ToArray()).RegistrationId;
}
I can obviously set the tags manually there, however how do i 'call' this Method again if the tags need to be changed?
So bottom line, my question is how do i set up push notification to specific devices on xamarin.forms android/ios?
Thanks.
I'm looking at the core-CreateNewConversation sample in the Bot builder examples repo (https://github.com/Microsoft/BotBuilder-Samples). There is a method available on IDialogStack called PollAsync that seems to be gone after version 3.5.0 of bot builder. Is there a reason for this?
In reality, it was just moved from the IDialogStack class to the IDialogTask class.
Instead of doing:
IDialogStack stack = stack = scope.Resolve<IDialogStack>();
you have to do
IDialogTask task = scope.Resolve<IDialogTask>();
then you can just do:
task.Call(interruption, null);
await task.PollAsync(token);
There is a pull request that is updating the sample taking into account this change.
I am trying to make my application work with our IdentityServer3. The unsolvable to me seems that there is no IdentityServer3.AccessTokenValidation package for .NetCore. I have to validate the token (other software works in that manner, but using .NetFramework with no trouble), what are my options or perhaps I didn't research properly?
I would really love to see
app.UseIdentityServerBearerTokenAuthentication(new IdentityServerBearerTokenAuthenticationOptions
{
Authority = "https://identity.identityserver.io",
RequiredScopes = new[] { "api1", "api2" }
});
For Asp.Net Core use IdentityServer4.AccessTokenValidation. Just grab it via your NuGet package manager. Remember IDS3 and IDS4 are just implementations of a common set of protocols. Your OP can be written in Asp.Net Core (eg with IDS4) and your WebApi can still be using MVC5 (using IDS3 AccessTokenValidation) and vice versa scenario applies. In the IDS4 version of this middleware you will need to use ScopeName and AdditionalScopes to achieve your goals