mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
* Remove global config from memory * Remove runtime global config * Remove from storage * Remove global config * Fix event stream tests * Fix sandbox issue * Change config * Removed transferred tests * Add swe env box * Fixes on testing * Fixed some tests * Fix typing * Fix ipython test * Revive function * Make temp_dir fixture * Remove test to avoid circular import
15 lines
500 B
Python
15 lines
500 B
Python
from .files import FileStore
|
|
from .local import LocalFileStore
|
|
from .memory import InMemoryFileStore
|
|
from .s3 import S3FileStore
|
|
|
|
|
|
def get_file_store(file_store: str, file_store_path: str | None = None) -> FileStore:
|
|
if file_store == 'local':
|
|
if file_store_path is None:
|
|
raise ValueError('file_store_path is required for local file store')
|
|
return LocalFileStore(file_store_path)
|
|
elif file_store == 's3':
|
|
return S3FileStore()
|
|
return InMemoryFileStore()
|