-
Notifications
You must be signed in to change notification settings - Fork 272
Passing Parameters to Contexts #402
Comments
Just discovered that exactly the same applies to passing parameters to the payload of the detectIntent. |
👋 @arielschvartz this looks like a duplicate of #97, which is a fairly common complaint we get here. The client itself is actually generated, so I think getting a feature like this in will be tricky and probably take some time (although I do believe it is on our radar). In the mean time we've been suggesting using pb-util to convert protobuf structures like this. |
Thank you very much @callmehiphop ! Gonna use the lib for now! But I suggest adding it to the docs in the dialogflow website! Would be simples and help a lot of people! |
@arielschvartz thanks for the suggestion! @bcoe any idea how we can do a better job of documenting this? Seems like a common point of frustration for users here, but I'm not really sure how to solve the issue since everything for Dialogflow is generated. |
@arielschvartz Thanks a lot man!!! |
When passing parameters to a new contexts (via createContext or detectIntent), you cannot just passa an object.
For example:
In the above example, the foo parameter is not set in the context. For it to work you should pass like:
As solution, I think the better way would be for the lib to handle that and convert. The other way of resolving this problem would be simply updating the documentation.
By the way, I didn't find anywhere in the Dialogflow documentation the possible values for a field (like stringValue). Is there something like numberValue, datetimeValue?
Hope it help other people! =)
The text was updated successfully, but these errors were encountered: