0

I am trying to implement the chat bot per this tutorial.

Success fully completed the below steps,

1. Train a Model Using BigQuery Machine Learning
2. Create a Dialogflow Agent
3. Import an IT helpdesk agent
4. Use the Inline Editor to create a fulfillment that integrates with BigQuery
5. Enable webhook for fulfillment

On testing the chatbot after all these steps I dont get the desired output at step 6. Test Your Chatbot! with the inputs:

a.Hi
b.I would like to submit a ticket
c.My email is student@qwiklabs.net
d.I can't login

Instead of creating a ticket and displaying the estimated time, I get an empty response, it says: Default response : Not available.

Under the diagnostic info I can see the below error under the Fulfillment status tab:

"Webhook call failed. Error: UNKNOWN."

Also the query used in the index.js tab returns an error while being directly executed on Bigquery I have double checked all the steps in the tutorial I cant seem to make this work.

Kevin Quinzel
  • 1,172
  • 1
  • 9
  • 17
  • 1
    "the query used in the index.js tab returns an error while being directly executed on Bigquery" - what is the error? Please include as much detail as you can. – Nathan Griffiths Jan 21 '20 at 20:05
  • This is the error,"Invalid table-valued function ML.PREDICT Model helpdesk.predict_eta cannot accept column category due to type mismatch. Data type INT64 does not match what model expects: STRING" at this line FROM ML.PREDICT(MODEL helpdesk.predict_eta, TABLE pred_table) – Kaustubh pande Jan 22 '20 at 04:27
  • 1
    At a guess, something has gone wrong at the start of Step 2 where you create the table "helpdesk.issues" from a CSV file. Check the schema of the table that was created - is column "category" of type string or int64? If it's not string, check that the correct file path was specified when creating the table, because it was set up to automatically infer schema if there's something wrong with the file it might have inferred the wrong data types for the columns. – Nathan Griffiths Jan 22 '20 at 20:11
  • Nathan's comment is right. But I would add: Make sure that your JS code stringifies your arguments. My thoughts are that or either you receive the arg as an integer or somewhere within the code, the variable is converted to integer. – Kevin Quinzel Jan 22 '20 at 20:59

1 Answers1

1

I have like a same issue. I used "Diagnostic info" and "Copy fulfillment request as curl" from your tutorial. When I tried to execute this curl I got 403 "Your client does not have permission to get URL". If you try to reproduce these steps and you will get the same errors then the problem may be related to your cloud function invoke permissions. To fix the permissions problems

  1. Go to the cloud function tab
  2. Select your cloud function (check box)
  3. Click "Add members" under Permissions tab in the right side
  4. Enter "allUsers" under "New memebers"
  5. Select Role as "Cloud Functions -> Cloud Functions Invoker"
  6. Save
  7. Test your cloud function by just pasting it in the browser

from there: Firebase cloud function "Your client does not have permission to get URL /200 from this server"

IamMan
  • 312
  • 2
  • 12