0

Our company has been looking for a NLP API to use for a chatbot

we have something running for now with wit.ai

but I couldn't figure out a way to have it call custom methods in our API or make calls to our API to get user specific information.

Is there a way to do this or which other NLP API can I use to achieve this?

PS: Our APi is written using the Phalcon PHP framework.

In essence, I want to be able to achieve something like so:

function getSpending($userId)
{
     // Calculate spending from DB queries
     return $spending;
}

$spending = getSpending($some_user_id);

User: "What is my spending for the past week?";
Bot: "You spent" . spending. " last week.";

OR

User: "What is my spending for the past week?";
//bot makes API call to our API. then...
Bot: "You spent" . spending. " last week.";
Pila
  • 5,460
  • 1
  • 19
  • 30

1 Answers1

0

Apparently, the way to perform custom operations or make method calls is based on the response entities. What I ended up doing was send a request to wit.ai, which send a response with certain entities based on the intelligence learned from the request. When I get the response, I then use it to perform custom operations on my server side based on the entities in the response and this is working as expected.

Pila
  • 5,460
  • 1
  • 19
  • 30