google-cloud-dialogflow QueryInput set context

血红的双手。 提交于 2019-12-11 07:44:25

问题


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).

来源:https://stackoverflow.com/questions/47432914/google-cloud-dialogflow-queryinput-set-context

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!