Files
OpenHands/opendevin/storage/__init__.py
Robert Brennan dcb5d1ce0a Add permanent storage option for EventStream (#1697)
* add storage classes

* add minio

* add event stream storage

* storage test working

* use fixture

* event stream test passing

* better serialization

* factor out serialization pkg

* move more serialization

* fix tests

* fix test

* remove __all__

* add rehydration test

* add more rehydration test

* fix fixture

* fix dict init

* update tests

* lock

* regenerate tests

* Update opendevin/events/stream.py

* revert tests

* revert old integration tests

* only add fields if present

* regen tests

* pin pyarrow

* fix unit tests

* remove cause from memories

* revert tests

* regen tests
2024-05-14 11:09:45 -04:00

22 lines
486 B
Python

from opendevin.core.config import config
from .files import FileStore
from .local import LocalFileStore
from .memory import InMemoryFileStore
from .s3 import S3FileStore
def _get_file_store() -> FileStore:
if config.file_store == 'local':
return LocalFileStore(config.file_store_path)
elif config.file_store == 's3':
return S3FileStore()
return InMemoryFileStore()
singleton = _get_file_store()
def get_file_store() -> FileStore:
return singleton