コード例 #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')
コード例 #2
0
ファイル: test_examples.py プロジェクト: viktara/rasa_core
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?'
コード例 #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?'
コード例 #4
0
ファイル: test_examples.py プロジェクト: rohitjun08/rasa_core
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?'