MCPcopy Create free account
hub / github.com/Bairong-Xdynamics/MistakeNotebookLearning / _setup_env

Function _setup_env

examples/utils/appworld_utils.py:14–20  ·  view source on GitHub ↗
(libs_path: str, appworld_root: str, api_key: str = "EMPTY", model_server_url: str = None)

Source from the content-addressed store, hash-verified

12# ================= 1. Path & Environment =================
13
14def _setup_env(libs_path: str, appworld_root: str, api_key: str = "EMPTY", model_server_url: str = None):
15 if libs_path not in sys.path:
16 sys.path.insert(0, libs_path)
17 os.environ["APPWORLD_ROOT"] = appworld_root
18 os.environ["OPENAI_API_KEY"] = api_key
19 if model_server_url:
20 os.environ["MODEL_SERVER_URL"] = model_server_url
21
22current_dir = os.path.dirname(os.path.abspath(__file__))
23project_root = os.path.dirname(os.path.dirname(current_dir))

Callers 2

appworld_utils.pyFile · 0.85
_worker_process_taskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected