refactor(reme_ai): move FLOW_APP_NAME check to __init__.py

- Move the FLOW_APP_NAME environment variable check from app.py to __init__.py
- This change ensures that the environment variable is checked as soon as the package is imported
- Removed redundant import of os in app.py since it's no longer needed there
This commit is contained in:
jinli.yl 2025-09-16 17:09:09 +08:00
parent 3d430c2d24
commit 1a549de552
2 changed files with 4 additions and 4 deletions

View file

@ -1,3 +1,7 @@
import os
assert "FLOW_APP_NAME" in os.environ, "please set FLOW_APP_NAME in `.env`"
from reme_ai import react
from reme_ai import retrieve
from reme_ai import summary

View file

@ -1,13 +1,9 @@
import os
import sys
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning, module="websockets")
warnings.filterwarnings("ignore", category=DeprecationWarning, module="uvicorn")
assert "FLOW_APP_NAME" in os.environ, "please set FLOW_APP_NAME in `.env`"
from flowllm.app import FlowLLMApp
from reme_ai.config.config_parser import ConfigParser