__init__.py 623 B

12345678910111213141516171819202122232425
  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. elif name == 'remote':
  11. from openhands.runtime.remote.runtime import RemoteRuntime
  12. return RemoteRuntime
  13. else:
  14. raise ValueError(f'Runtime {name} not supported')
  15. __all__ = [
  16. 'E2BBox',
  17. 'get_runtime_cls',
  18. ]