__init__.py 499 B

123456789101112131415161718192021
  1. from openhands.runtime.e2b.sandbox import E2BBox
  2. def get_runtime_cls(name: str):
  3. # Local imports to avoid circular imports
  4. if name == 'eventstream':
  5. from openhands.runtime.client.runtime import EventStreamRuntime
  6. return EventStreamRuntime
  7. elif name == 'e2b':
  8. from openhands.runtime.e2b.runtime import E2BRuntime
  9. return E2BRuntime
  10. else:
  11. raise ValueError(f'Runtime {name} not supported')
  12. __all__ = [
  13. 'E2BBox',
  14. 'get_runtime_cls',
  15. ]