Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /li-boxuan_OpenDevin /openhands /server /__main__.py
| # IMPORTANT: LEGACY V0 CODE | |
| # This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1. | |
| # OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to: | |
| # - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk | |
| # - V1 application server (in this repo): openhands/app_server/ | |
| # Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above. | |
| # Tag: Legacy-V0 | |
| # This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/. | |
| import os | |
| import warnings | |
| import uvicorn | |
| from openhands.core.logger import get_uvicorn_json_log_config | |
| def main(): | |
| # Suppress SyntaxWarnings from pydub.utils about invalid escape sequences | |
| warnings.filterwarnings('ignore', category=SyntaxWarning, module=r'pydub\.utils') | |
| # When LOG_JSON=1, configure Uvicorn to emit JSON logs for error/access | |
| log_config = None | |
| if os.getenv('LOG_JSON', '0') in ('1', 'true', 'True'): | |
| log_config = get_uvicorn_json_log_config() | |
| uvicorn.run( | |
| 'openhands.server.listen:app', | |
| host='0.0.0.0', | |
| port=int(os.environ.get('port') or '3000'), | |
| log_level='debug' if os.environ.get('DEBUG') else 'info', | |
| log_config=log_config, | |
| # If LOG_JSON enabled, force colors off; otherwise let uvicorn default | |
| use_colors=False if log_config else None, | |
| ) | |
| if __name__ == '__main__': | |
| main() | |
Xet Storage Details
- Size:
- 1.56 kB
- Xet hash:
- 61710841a9ee9861913b382844a1302ae01e6523d5812564a4fbcb9b0dcd3ffe
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.