Aller directement au contenu principal

openhands.runtime.impl.modal.modal_runtime

ModalLogStreamer Objects

class ModalLogStreamer(LogStreamer)

Streams Modal sandbox logs to stdout.

This class provides a way to stream logs from a Modal sandbox directly to stdout through the provided logging function.

ModalRuntime Objects

class ModalRuntime(EventStreamRuntime)

This runtime will subscribe the event stream.

When receive an event, it will send the event to runtime-client which run inside the Modal sandbox environment.

Arguments:

  • config AppConfig - The application configuration.
  • event_stream EventStream - The event stream to subscribe to.
  • sid str, optional - The session ID. Defaults to 'default'.
  • plugins list[PluginRequirement] | None, optional - List of plugin requirements. Defaults to None.
  • env_vars dict[str, str] | None, optional - Environment variables to set. Defaults to None.

close

def close()

Closes the ModalRuntime and associated objects.