rasa/core/training/interactive.py
async def _write_domain_to_file(
    domain_path: Text,
    evts: List[Dict[Text, Any]],
    endpoint: EndpointConfig
) -> None:
    """Write an updated domain file to the file path."""

    domain = await retrieve_domain(endpoint)
    old_domain = Domain.from_dict(domain)

    messages = _collect_messages(evts)
    actions = _collect_actions(evts)

    # TODO for now there is no way to distinguish between action and form
    intent_properties = Domain.collect_intent_properties(
        _intents_from_messages(messages))

    collected_actions = list({e["name"]
                              for e in actions
                              if e["name"] not in default_action_names()})

    new_domain = Domain(
        intent_properties=intent_properties,
        entities=_entities_from_messages(messages),
        slots=[],
        templates={},
        action_names=collected_actions,
        form_names=[])

    old_domain.merge(new_domain).persist_clean(domain_path)
Write an updated domain file to the file path.
Write an updated domain file to the file path.
Write an updated domain file to the file path .
async def _write_domain_to_file(
    domain_path: Text,
    evts: List[Dict[Text, Any]],
    endpoint: EndpointConfig
) -> None:
    domain = await retrieve_domain(endpoint)
    old_domain = Domain.from_dict(domain)
    messages = _collect_messages(evts)
    actions = _collect_actions(evts)
    intent_properties = Domain.collect_intent_properties(
        _intents_from_messages(messages))
    collected_actions = list({e["name"]
                              for e in actions
                              if e["name"] not in default_action_names()})
    new_domain = Domain(
        intent_properties=intent_properties,
        entities=_entities_from_messages(messages),
        slots=[],
        templates={},
        action_names=collected_actions,
        form_names=[])
    old_domain.merge(new_domain).persist_clean(domain_path)
async def _write_domain_to_file ( domain_path : Text , evts : List [ Dict [ Text , Any ] ] , endpoint : EndpointConfig ) -> None : domain = await retrieve_domain ( endpoint ) old_domain = Domain . from_dict ( domain ) messages = _collect_messages ( evts ) actions = _collect_actions ( evts ) intent_properties = Domain . collect_intent_properties ( _intents_from_messages ( messages ) ) collected_actions = list ( { e [ "name" ] for e in actions if e [ "name" ] not in default_action_names ( ) } ) new_domain = Domain ( intent_properties = intent_properties , entities = _entities_from_messages ( messages ) , slots = [ ] , templates = { } , action_names = collected_actions , form_names = [ ] ) old_domain . merge ( new_domain ) . persist_clean ( domain_path )
Write an updated domain file to the file path.
Write an updated domain file to the file path .
"""Write an updated domain file to the file path.""" # TODO for now there is no way to distinguish between action and form
domain_path
Text
evts
List[Dict[Text, Any]]
endpoint
EndpointConfig