Can not deploy Entries in Entities to DialogFlow - dialogflow-es

I'm currently working with Custom Entities (Developer Entities) via modifying Entities JSON Docs
I know how to create & link manually my Custom Entities with my Intents.
I had
en-US.json with customized entities (Valid json)
{
"invocation": "Test",
"intents": [
...
],
"dialogflow": {
"intents": [
{
"name": "Default Fallback Intent",
"auto": true,
"webhookUsed": true,
"fallbackIntent": true
},
{
"name": "Default Welcome Intent",
"auto": true,
"webhookUsed": true,
"events": [
{
"name": "WELCOME"
}
]
}
],
"entities": [
{
"id": "f060b6f7-7a17-4355-9fa6-3ce02f0ce33a",
"name": "additionalTopic",
"isOverridable": true,
"entries": [
{
"synonyms": [
"usuk",
"us",
"uk",
"us music",
"uk music",
"play usuk",
"play us",
"play uk",
"play us music",
"play uk music"
],
"value": "usuk"
},
{
"synonyms": [
"vn",
"vietnamese"
],
"value": "vn"
}
],
"isEnum": false,
"automatedExpansion": false
}
]
}
It looks like correct as Entities JSON Docs
I build with jovo command line : jovo build
It generated additionalTopic.json & additionalTopic_usersays_en.json in folder platforms/googleAction/dialogflow/entities, as image
These steps in above looks like OK, right?
Then I deploy to DialogFlow via jovo command line : jovo deploy --project-id PROJECT_ID
It deployed success as usually.
Last steps I going to DialogFlow Console to check Custom Entities I created,
And here it is.
Entities name appeared, but where is synonyms?
What I want is after deployed, it expects as first image in above.
Please take a look and help me find the way,
Really thanks.
p/s : I'm using DialogFlow Console version 2.

It looks like this is the bug in jovo-framework.
In this time, jovo-framework only support for DialogFlow version 1.
jovo releases note : https://github.com/jovotech/jovo-framework-nodejs/releases

Related

How do I retrieve multiple callbacks on translation progress

I have created a webhook that is using the even extraction.updated that should trigger when a job is in progress. I want to retrieve multiple calls on the progress of the translation so that I can show it in my progress bar. Unfortunately I only retrieve a callback when the job translation is finished. When I create the job I set the misc.workflow parameter and same goes for the hook. Am I missing some parameters when creating a webhook or posting a job?
I was following this tutorial: https://forge.autodesk.com/en/docs/webhooks/v1/tutorials/create-a-hook-model-derivative/
The job payload takes the input which is my urn, output which is the filetype(svf2) and views(2d,3d), and misc which is the workflow(testworkflowname)
Callback result:
{{
"version": "1.0",
"resourceUrn": "<my-resourceUrn>",
"hook": {
"hookId": "<my-hookId>",
"tenant": "testworkflowname",
"callbackUrl": "<my-callbackUrl>",
"createdBy": "<my-createdBy>",
"event": "extraction.updated",
"createdDate": "<my-createdDate>",
"lastUpdatedDate": "<my-lastUpdatedDate>",
"system": "derivative",
"creatorType": "Application",
"status": "active",
"scope": {
"workflow": "testworkflowname"
},
"hookAttribute": {
"progress": "test"
},
"autoReactivateHook": false,
"urn": "<my-urn>"
},
"payload": {
"TimeStamp": <my-timestamp>,
"Env": "production",
"URN": "<my-urn>",
"EventType": "UPDATED",
"Payload": {
"status": "success",
"bubble": {
"guid":"<my-guid>",
"owner": "<my-owner>",
"hasThumbnail": "true",
"startedAt": "my-startedAt>",
"type": "design",
"urn":"<my-urn>",
"success": "100%",
"progress": "complete",
"region": "US",
"status": "success",
"children": []
},
"scope": "<my-scope>",
"registerKey": []
},
"WorkflowAttributes": null
}
}}
You've got your webhooks setup correctly. I'm afraid this is a limitation on the Model Derivative service side. The service can translate over 60 different file formats today, and as you can imagine, different formats must be converted using different libraries. And while some of the converters support progress reporting, others may not, so being able to get notified of translation progress really depends on the file format you're processing.

Azure Rule engine File extension with json file

I am trying to create a rule engine in a cdn endpoint. like this:
But using a Json file (The result in the image has been achieved manually but now i want to automate this).
So far I got this:
"deliveryPolicy": {
"description": "Rewrite and Redirect",
"rules": [
{
"name" : "UrlFileExtension",
"order": 2,
"conditions": [
{
"name": "UrlFileExtension",
"parameters": {
"#odata.type": "#Microsoft.Azure.Cdn.Models.UrlFileExtensionMatchConditionParameters",
"Extension": 0,
"operator": "LessThanOrEqual",
"matchValues": [0]
}
}
],
"actions": [
{
"name": "UrlRewrite",
"parameters": {
"#odata.type": "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRewriteActionParameters",
"sourcePattern": "/",
"destination": "/index.html",
"preserveUnmatchedPath": false
}
}
]
},
The action works just fine, but the urlfileextentionI cant get it to work, it does not recognize the odata.type either.
Please any hint ot suggestion how to fix the condition?
You might want to try with this odata.type for the condition
"#odata.type": "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionMatchConditionParameters",
instead of
"#odata.type": "#Microsoft.Azure.Cdn.Models.UrlFileExtensionMatchConditionParameters",
https://learn.microsoft.com/en-us/python/api/azure-mgmt-cdn/azure.mgmt.cdn.models.urlfileextensionmatchconditionparameters?view=azure-python
(I'm aware the documentation says Python, I could not find better, but it could be your solution)

How to correctly use LUIS ML-features?

I just stumbled over the new "ML-features" in LUIS and I am not sure if I really understand how to use them correctly. The documentation seems very abstract and vague to me:
https://learn.microsoft.com/de-de/azure/cognitive-services/luis/luis-concept-feature
Besides a good general explanation a solution for the following example would be very welcome:
Example
Intent: OpenABox
Sample utterances: "open the green box", "open the azure box".
Entity: ColorEntity (no prebuilt entity).
The color should understand "green", "blue", "azure" and "olive", where "olive" should be regarded as synonym to "green" and "azure" to "blue".
Solution Proposal
I assume you would have to
Add an intent
Add a list-entity, that lists all colors and assigns their synonyms?
Add a phrase list, that again lists some, but maybe not all, colors, without respect to their meaning?
Make the ML-feature global?
Mark the values as interchangable?
Add a ML-entity, and assign the list entity as well as the phrase list as features?
Make the list-entity-feature required?
Add sample utterances and mark the entities with the list-entity? Or with the ML-entity? Or both?
Add the ML-Entity as feature to the intent? Or the phrase list? Or the list-entity? Or none at all?
Is it correct, that there is no way to confirm the correct resolution of "olive" to its canonical form "green" using the test panel? So I have to use the API to test this?
The Model
This model has been created as described above. It seems to do its job. But is this really the optimal way to do it? There seems to be a lot of redundancy in there.
{
"luis_schema_version": "7.0.0",
"intents": [
{
"name": "None",
"features": []
},
{
"name": "OpenABox",
"features": [
{
"modelName": "ColorMLEntity",
"isRequired": false
}
]
}
],
"entities": [
{
"name": "ColorMLEntity",
"children": [],
"roles": [],
"features": [
{
"featureName": "ColorPhraseList",
"isRequired": false
},
{
"modelName": "ColorListEntity",
"isRequired": true
}
]
}
],
"hierarchicals": [],
"composites": [],
"closedLists": [
{
"name": "ColorListEntity",
"subLists": [
{
"canonicalForm": "green",
"list": [
"olive"
]
},
{
"canonicalForm": "blue",
"list": [
"azure"
]
}
],
"roles": []
}
],
"prebuiltEntities": [],
"utterances": [
{
"text": "open the azure box",
"intent": "OpenABox",
"entities": [
{
"entity": "ColorMLEntity",
"startPos": 9,
"endPos": 13,
"children": []
}
]
},
{
"text": "open the green box",
"intent": "OpenABox",
"entities": [
{
"entity": "ColorMLEntity",
"startPos": 9,
"endPos": 13,
"children": []
}
]
}
],
"versionId": "0.1",
"name": "ColorTest",
"desc": "",
"culture": "en-us",
"tokenizerVersion": "1.0.0",
"patternAnyEntities": [],
"regex_entities": [],
"phraselists": [
{
"name": "ColorPhraseList",
"mode": true,
"words": "green,blue,azure,olive",
"activated": true,
"enabledForAllModels": false
}
],
"regex_features": [],
"patterns": [],
"settings": []
}
Features are supposed to be signals relevant to an intent, or an entity.
So for this example,
Create an ML entity "ColorEntity",
Label the utterances
Add ColorEntity as a feature for the intent
Then you can add a feature to ColorEntity, either a list entity or phrase list, no need for both.

GPS location for IoT central map tile

I am trying to get my IoT Central app to show the GPS location using a map tile. My JSON file sends over the location and i have this tied to the map tile but the map tile keeps saying "Waiting for data" I have tried everything to get this to show and i can't seem to get it to work.
I have followed the JSON layout as shown here
You can see the raw data tab below which shows the data coming in and that it is associating the data with the gps capability but the map shows nothing.
enter image description here
I have just made a quick test and it looks like everything is working well:
New App with a custom device template
Creating a View
Exporting a device template for my tester (simulator):
{
"#id": "urn:custom6ec42lhnjx:gps38u:1",
"#type": "CapabilityModel",
"contents": [],
"displayName": {
"en": "gps"
},
"implements": [
{
"#type": "InterfaceInstance",
"displayName": {
"en": "Interface"
},
"name": "gpsea",
"schema": {
"#id": "urn:custom6ec42lhnjx:gpsea:1",
"#type": "Interface",
"contents": [
{
"#type": [
"Telemetry",
"SemanticType/Location"
],
"displayName": {
"en": "gps"
},
"name": "gps",
"schema": "geopoint"
},
{
"#type": [
"Telemetry",
"SemanticType/Temperature"
],
"displayName": {
"en": "temp"
},
"name": "temp",
"schema": "double"
}
],
"displayName": {
"en": "Interface"
}
}
}
],
"#context": [
"http://azureiot.com/v1/contexts/IoTModel.json"
]
}
Provisioning and Simulating device (with a random values):
Dashboard IoT Central App:
Example with simulating your telemetry data:
I finally got it working, unfortunately only by starting again and deleting everything i had done thus far, as soon as i recreated my IoTC app and reimplemented the function that deals with the webhook everything worked perfectly. Still strange as the data format and everything else remained unchanged. But thank you for your help.

Amexon alexa development InvalidIntentSamplePhraseSlot issue

I'm getting an error: cannot include both a phrase slot and another intent slot. Error code: InvalidIntentSamplePhraseSlot while building Alexa skill.
Sample JSON is as follows,
{
"name": "HackathonListIntent",
"slots": [
{
"name": "resultCount",
"type": "AMAZON.NUMBER"
},
{
"name": "search1",
"type": "AMAZON.SearchQuery"
},
{
"name": "search2",
"type": "AMAZON.SearchQuery"
}
],
"samples": [
"{resultCount} for {search1} from {search2}",
]}
resultCount: skill fetch thousands of result from backend this parameter will restrict result length as per users convenience.
search1 and search2 are different independent search parameter which user may ask.
FYI: I have tried this
For the InvalidIntentSamplePhraseSlot issue, according to Amazon's documentation, you can only use one AMAZON.SearchQuery slot per intent.
"Make sure that your skill uses no more than one AMAZON.SearchQuery slot per intent."
https://developer.amazon.com/docs/custom-skills/slot-type-reference.html#amazonsearchquery
Also, for your sample entry make sure the array with one item does not include a comma. It will cause an Invalid JSON error.
"samples": [
"{resultCount} for {search1} from {search2}"
]}
AMAZON.SearchQuery are limited to 1 slot per intent and also it will need a phrase along with the slot. I would suggest you to use AMAZON.Person as it can take any value and dose not need a phrase.
{
"name": "HackathonListIntent",
"slots": [
{
"name": "resultCount",
"type": "AMAZON.NUMBER"
},
{
"name": "search2",
"type": "AMAZON.Person"
},
{
"name": "search2",
"type": "AMAZON.Person"
}
],
"samples": [
"{resultCount} for {search1} from {search2}"
]
}

Resources