Skip to content

Commit

Permalink
Fixed an issue with Random static responses
Browse files Browse the repository at this point in the history
  • Loading branch information
pradeepmvn committed Oct 25, 2017
1 parent ffaa556 commit b8e757d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/routes/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ function updateAndSendRasaResponse(req,cacheKey,rasa_response, modelName, projec
});
}else{
//no webhook, check if there is a static response configured
db.any('SELECT responses.response_text FROM responses, intents where responses.intent_id = intents.intent_id and intents.intent_name = $1 order by random() LIMIT 1', rasa_response.intent.name)
db.any('SELECT responses.response_text FROM responses, intents where responses.intent_id = intents.intent_id and intents.intent_id = $1 order by random() LIMIT 1', data[0].intent_id)
.then(function (data) {
if (data.length > 0) {
rasa_response.response_text =data[0].response_text;
Expand Down

0 comments on commit b8e757d

Please sign in to comment.