eristemena / botman-driver-dialogflow

BotMan Dialogflow Driver
MIT License
11 stars 2 forks source link

Need example code to try #3

Open luizjr opened 5 years ago

luizjr commented 5 years ago

I'm using botman studio but not run, can help by example code?

valdu02100 commented 5 years ago

Hi! Hi! Same problem for me. I don't see how to initiate this library. I'm on Botman Studio v2. Did anyone succeed?

Thank you in advance for your help.

adhiarta commented 5 years ago

just edit routes/botman.php

sample :

<?php
$botman = resolve('botman');

$botman->hears('Default Welcome Intent', function ($botman) {
    $botman->reply('Hi, welcome!');
});
Benjizle commented 3 years ago

I have tried to use this with no luck, kindly provide some details / guidance

  1. do I have to enable fulfillment webhook in Dialogflow?
  2. any class to import?
**see my sample code in routes/botman.php
<?php
use BotMan\BotMan\BotManFactory;
use App\Http\Controllers\BotManController;

$botman = BotManFactory::create([]);
$botman->hears('Send - yes', function($botman) {
    $botman->reply('goof');
})**

I wonder how this will connect to Dialogflow without the service account or does this require Dialogflow middleware drivers which already has the GCP service account details.

I am using the latest version of botman studio

please help!

nachoaguirre commented 3 years ago

Hi @Benjizle did you manage to connect the driver with your service account? I'm stuck with it

Benjizle commented 3 years ago

Hi @Benjizle did you manage to connect the driver with your service account? I'm stuck with it

Yes I did, it works seamlessly afterward, I am currently away from my laptop. I will share the details when I get a hold of my laptop.