dialogflow / dialogflow-java-client-v2

Java client for Dialogflow: Design and integrate a conversational user interface into your applications and devices.
Apache License 2.0
59 stars 58 forks source link

What about the AIWebhookServlet? #17

Closed davidmarinangeli closed 6 years ago

davidmarinangeli commented 6 years ago

Hello, I'm building a webhook with DF + AoG and I'm using your APIs. In the first version we could extend an AIWebhookServlet in order to manage requests:

@WebServlet("/webhook")
public class WebhookSample extends AIWebhookServlet {
  private static final long serialVersionUID = 1L;

  @Override
  protected void doWebhook(AIWebhookRequest input, Fulfillment output) {
    output.setSpeech("You said: " + input.getResult().getFulfillment().getSpeech());
  }
}

What about now? Are there some samples like that? When will Dialogflow implement fullfilment also in Java?

lukaszbk commented 6 years ago

@davidmarinangeli, we are not planning to provide a servlet skeleton any more. We do, however, specify the format of webhook request / response your server shall receive / return as JSON objects: https://cloud.google.com/dialogflow-enterprise/docs/reference/rpc/google.cloud.dialogflow.v2#webhookrequest

davidmarinangeli commented 6 years ago

Okay, so I have to "build" the JSON by my own...

openpathgit commented 6 years ago

We really want this support Google!