Skip to content

Instantly share code, notes, and snippets.

Avatar

Justina Petraityte JustinaPetr

View GitHub Profile
View config.yml
pipeline:
- name: "intent_featurizer_count_vectors"
- name: "intent_classifier_tensorflow_embedding"
intent_tokenization_flag: true
intent_split_symbol: "+"
View load_nlu_model.py
interpreter = Interpreter.load('models/current/nlu_model')
print(interpreter.parse("Yes. Can you give me suggestions on how to get there?"))
View output.json
{
'intent':{
'name':'affirm+ask_transport',
'confidence':0.918471097946167
},
'entities':[
],
'intent_ranking':[
{
View domain.yml
templates:
utter_greet:
- "Hey, how can I help you?"
utter_goodbye:
- "Talk to you later!"
- "Goodbye :("
- "Bye!"
utter_affirm:
- "Cool. Let me book the spot for you."
- "Glad to hear. I'll make an RSVP for you."
View action.json
{
"actions": [
{
"description": "Default Welcome Intent",
"name": "MAIN",
"fulfillment": {
"conversationName": "<INSERT YOUR CONVERSATION NAME HERE>"
},
"intent": {
"name": "actions.intent.MAIN",
View action_completed.json
{
"actions": [
{
"description": "Default Welcome Intent",
"name": "MAIN",
"fulfillment": {
"conversationName": "welcome"
},
"intent": {
"name": "actions.intent.MAIN",
View gist:51ba567f9fea5c69c8c9a2bab86fa512
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
from flask import Flask, Response, Blueprint, request, jsonify
from rasa_core.channels.channel import UserMessage, OutputChannel
from rasa_core.channels.channel import InputChannel
View ga_connector_class.py
class GoogleAssistant(InputChannel):
@classmethod
def name(cls):
def blueprint(self, on_new_message):
View ga_connector_name.py
@classmethod
def name(cls)
returngoogle_assistant
View ga_connector_blueprint.py
def blueprint(self, on_new_message):
google_webhook = Blueprint('google_webhook', __name__)