Setting the context with dialogflow javaclient v1 is well explained.
v1 maven dependency being :
ai.api.libai.samples
libai-samples 1.6.12
I am trying to use the v2 of javaclient of google-cloud-dataflow.
com.google.cloud
google-cloud-dialogflow
0.45.0-alpha
There are no good examples of how to set the context for an intent.
Can someone please help me with this?
Related
I want to get all destinations on subaccount and instance level. In SAP API business Hub, I found the API information and "SAP Cloud SDK" tab to generate code by OpenAPI generator.
https://api.sap.com/api/SAP_CP_CF_Connectivity_Destination/overview
I downloaded the API specification and added dependencies into Cloud SDK for Java project. The code is generated successfully with some errors (unknown models)in generated api classes.
For example in DestinationsOnSubaccountLevelApi.class, model OneOfDestinationNameOnly is imported and used in method but it is not generated in model package.
I looked into API specification and found that there were two types of response entity. That is the reason why the code could not be generated properly. I can modify the API specification to make it work but it should not be the long term solution. Is there any other way to fix this issue?
Unfortunately the SAP Cloud SDK Generator for Open API services is not yet able to understand oneOf relationship that is modeled in the specification.
As an alternative, would you consider using the DestinationAccessor API for resolving single destinations?
You can also directly instantiate an ScpCfDestinationLoader, which allows for querying all destinations:
ScpCfDestinationLoader loader = new ScpCfDestinationLoader();
DestinationOptions options = DestinationOptions
.builder()
.augmentBuilder(ScpCfDestinationOptionsAugmenter.augmenter().retrievalStrategy(ScpCfDestinationRetrievalStrategy.ALWAYS_SUBSCRIBER))
.build();
Try<Iterable<ScpCfDestination>> destinations = loader.tryGetAllDestinations(options);
Similar to the default behavior of DestinationAccessor API, in the code above only the subscriber account will be considered. Other options are:
ScpCfDestinationRetrievalStrategy.ALWAYS_SUBSCRIBER
ScpCfDestinationRetrievalStrategy.ALWAYS_PROVIDER
ScpCfDestinationRetrievalStrategy.SUBSCRIBER_THEN_PROVIDER
I am using version odata-v4-generator-cli 3.40.0 to generate a client from the SAP B1 Service Layer definition.
However, there are many errors like the following:
Function import DraftsService_SaveDraftToDocument has non-simple type for parameter Document, but OData V2 does not support non-simple types as function import parameters.
And the function is not present in the generated client code. The error seems to indicate it is a limitation with V2, but this is a V4 definition with the V4 version of the generator.
The log message you are seeing is indeed very misleading - in fact it is plain wrong.
We have a fix for the incorrect message in our pipeline.
In general, however, generating function imports (V2) and (un-)bound actions (V4) with non-primitive parameters is not yet supported in our OData generators.
This is why these methods are not included in the generated code.
We are receiving many requests asking for this feature and have it rather high up in our backlog.
Unfortunately, I cannot give any details for a release schedule - I will update this answer when we have more concrete information.
EDIT (06/14/2021)
With release 3.46.0 of the SAP Cloud SDK for Java, we have shipped a first version of bound functions and actions.
I have bot in v3(.net framework) for multiple intent and every intent having different set of questions/steps. There I am using 'PromptOption. choice' for showing dynamic set of questions/steps and taking answer from 'resume' method. added code below.
PromptDialog.Choice( context: context, **resume: ResumeAfterPromptAnswer, options: promptData.Choices**, prompt: promptData.Text, retry: BotConstants.InvalidSelection, attempts: 2, promptStyle: PromptStyle.Auto );
Now I am trying to migrate my bot to v4 but I am not getting such prompt functionality in V4. just having option for waterfall steps but not able to add steps dynamicaly.
If you have any solution please post it.
Thanks in advance.
What you're attempting to do is entirely possible in v4. I recommend checking out these community extensions, since they offer some v3-ish functions in v4:
Bot Builder ChoiceFlow (I think this is what you're looking for)
Bot Builder v4 FormFlow
Alternatively, you could use the vanilla v4 SDK and Create advanced conversation flow using branches and loops. The Complex Dialog Sample is a pretty good example of how to do this.
All that being said, I don't 100% understand what you're asking. If this doesn't address your question, please provide an example conversation flow and I can adjust my answer.
The Node-RED Info tab for Watson IoT Language Translator states: Source and destination language parameters can be configured through the editor panel or set dynamically using the language codes in the following properties, msg.srclang and msg.destlang. Trying to set it to "en" and "it" in a function node before the call to the node, but the Watson IoT Language Translator node still fail with "Model not found" error.
Are there some solution for it ?
Thanks in advance for your help.
Marco
As the Node configuration has defaulted, the domain that is being picked up is that of the configuration, which happens to not be 'news', hence its trying to use 'conversation en-it' which isn't available.
setting
msg.domain = 'news'
should resolve the problem.
I have implemented GCM with Xamarin.ios , I am able to get Device Token and GCM ID , But i am not able to recive Notification sent by Push sharp library . I am seeing log and i am getting below issue.Can this be reason of not receiving notification ?. Also we are new in Xamarin ,It will be hlpful if somebody can help us with podfile.
You have enabled the CloudMessaging service in Developer Console, but it appears as though your Podfile is missing the line: 'pod "Google/CloudMessaging" or you may need to run pod update in your project directory.
You need to add this component and implement it in your AppDelegate There are code examples of how to do so in the Getting Started section.
You need to add this component and implement it in your AppDelegate There are code examples of how to do so in the Getting Started section.