Search in sources :

Example 1 with MatchIntentRequest

use of com.google.cloud.dialogflow.cx.v3beta1.MatchIntentRequest in project java-dialogflow-cx by googleapis.

the class ITSystemTest method matchIntentTest.

@Test
public void matchIntentTest() {
    String session = String.format("%s/sessions/%s", agentName, ID);
    MatchIntentRequest request = MatchIntentRequest.newBuilder().setSession(session).setQueryInput(QUERY_INPUT).build();
    MatchIntentResponse matchIntentResponse = sessionsClient.matchIntent(request);
    assertTrue(matchIntentResponse.getMatchesList().size() > 0);
    assertEquals(TEXT, matchIntentResponse.getText());
}
Also used : MatchIntentRequest(com.google.cloud.dialogflow.cx.v3beta1.MatchIntentRequest) MatchIntentResponse(com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse) Test(org.junit.Test)

Aggregations

MatchIntentRequest (com.google.cloud.dialogflow.cx.v3beta1.MatchIntentRequest)1 MatchIntentResponse (com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse)1 Test (org.junit.Test)1