rasa/core/agent.py
async def load_from_server(
    agent,
    model_server: Optional[EndpointConfig] = None
) -> 'Agent':
    """Load a persisted model from a server."""

    # We are going to pull the model once first, and then schedule a recurring
    # job. the benefit of this approach is that we can be sure that there
    # is a model after this function completes -> allows to do proper
    # "is alive" check on a startup server's `/status` endpoint. If the server
    # is started, we can be sure that it also already loaded (or tried to)
    # a model.
    await _update_model_from_server(model_server, agent)

    wait_time_between_pulls = model_server.kwargs.get('wait_time_between_pulls',
                                                      100)

    if wait_time_between_pulls:
        # continuously pull the model every `wait_time_between_pulls` seconds
        await schedule_model_pulling(model_server,
                                     int(wait_time_between_pulls),
                                     agent)

    return agent
Load a persisted model from a server.
Load a persisted model from a server.
Load a persisted model from a server .
async def load_from_server(
    agent,
    model_server: Optional[EndpointConfig] = None
) -> 'Agent':
    await _update_model_from_server(model_server, agent)
    wait_time_between_pulls = model_server.kwargs.get('wait_time_between_pulls',
                                                      100)
    if wait_time_between_pulls:
        await schedule_model_pulling(model_server,
                                     int(wait_time_between_pulls),
                                     agent)
    return agent
async def load_from_server ( agent , model_server : Optional [ EndpointConfig ] = None ) -> 'Agent' : await _update_model_from_server ( model_server , agent ) wait_time_between_pulls = model_server . kwargs . get ( 'wait_time_between_pulls' , 100 ) if wait_time_between_pulls : await schedule_model_pulling ( model_server , int ( wait_time_between_pulls ) , agent ) return agent
Load a persisted model from a server.
Load a persisted model from a server .
"""Load a persisted model from a server.""" # We are going to pull the model once first, and then schedule a recurring # job. the benefit of this approach is that we can be sure that there # is a model after this function completes -> allows to do proper # "is alive" check on a startup server's `/status` endpoint. If the server # is started, we can be sure that it also already loaded (or tried to) # a model. # continuously pull the model every `wait_time_between_pulls` seconds
agent
model_server
Optional[EndpointConfig]