I'm trying to set parameters inside my EventInput
object, in order to send it inside my QueryInput
and detect the Intent. I'm using DialogFlow V2Beta1 API for Java version com.google.cloud:google-cloud-dialogflow:0.85.0-alpha
. I'm aware of the json expected format based on
Custom Events documentation, but all method available didn't work for me. Related question for other languages didn't awnser it either: set parameters in EventInput in Dialogflow V2 API. I'm losing something about protobuf pattern?
My parameters are the following:
I've already tried the below code, but it doesn't work, the response from server always asks "What is the location_user?", meaning that the parameter is missing. On DialogFlow V2 happens the same issue.
queryInput = QueryInput.newBuilder()
.setEvent(
EventInput.newBuilder()
.setName("REVISION")
.setParameters(
Struct.newBuilder()
.putFields("location_user",
Value.newBuilder()
.setStringValue("Campinas")
.build())
.build()
)
.setLanguageCode(config.getLanguage()
)
)
.build();
output json:
name: "REVISION"
parameters {
fields {
key: "location_user"
value {
string_value: "Campinas"
}
}
}
language_code: "pt-BR"