dialogflow-java-client-v2
dialogflow-java-client-v2 copied to clipboard
Missing in v2 the method (AIRequest setContexts) implemented in v1
Actually, i am using the V1 Dialogflow Client Java SDK.
<dependency> <groupId>ai.api</groupId> <artifactId>libai</artifactId> <version>1.6.12</version> </dependency> In the current stable version (1.6.12) we have the possibility to set the Contexts before the query is sent to the server, using the method
AIRequest setContexts(List<AIContext> contexts) This is usefull because we can set (prepare) the status of the dialogflow (chatbot).
How can i do the same with the new V2 DialogFlow Beta version?
<dependency> <groupId>com.google.cloud</groupId> <artifactId>google-cloud-dialogflow</artifactId> <version>0.29.0-alpha</version> </dependency> The samples for the new version are here https://github.com/dialogflow/dialogflow-java-client-v2 but i dont find the way to do that using the new library java version (2).
It can be set as part of QueryParameters: https://dialogflow.com/docs/reference/api-v2/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.QueryParameters