Exemple #1
0
def test_concertbot_training():
    from examples.concertbot.train import train_dialogue

    assert train_dialogue(domain_file='examples/concertbot/domain.yml',
                          stories_file='examples/concertbot/data/stories.md',
                          model_path='examples/concertbot/models/dialogue',
                          policy_config='examples/concertbot/'
                          'policy_config.yml')
Exemple #2
0
def test_restaurantbot_example():
    sys.path.append("examples/restaurantbot/")
    from bot import train_dialogue

    p = "examples/restaurantbot/"
    agent = train_dialogue(os.path.join(p, "restaurant_domain.yml"),
                           os.path.join(p, "models", "dialogue"),
                           os.path.join(p, "data", "babi_stories.md"))

    responses = agent.handle_message("_greet")
    assert responses[0] == 'how can I help you?'
Exemple #3
0
def test_restaurantbot_example():
    sys.path.append("examples/restaurantbot/")
    from bot import train_dialogue

    p = "examples/restaurantbot/"
    stories = os.path.join("data", "test_stories", "stories_babi_small.md")
    agent = train_dialogue(os.path.join(p, "restaurant_domain.yml"),
                           os.path.join(p, "models", "dialogue"), stories)

    responses = agent.handle_text("/greet")
    assert responses[0]['text'] == 'how can I help you?'
def test_restaurantbot_example():
    sys.path.append("examples/restaurantbot/")
    from bot import train_dialogue

    p = "examples/restaurantbot/"
    stories = os.path.join("data", "test_stories", "stories_babi_small.md")
    agent = train_dialogue(os.path.join(p, "restaurant_domain.yml"),
                           os.path.join(p, "models", "dialogue"),
                           stories)

    responses = agent.handle_text("/greet")
    assert responses[0]['text'] == 'how can I help you?'