| """ |
| Constants for CodeAct agent. |
| """ |
|
|
| import os |
|
|
| |
| LIBRARY_CONTENT_DICT = { |
| "numpy": "[Python Package] The fundamental package for scientific computing with Python, providing support for arrays, matrices, and mathematical functions.", |
| "scipy": "[Python Package] A Python library for scientific and technical computing, including modules for optimization, linear algebra, integration, and statistics.", |
| } |
|
|
|
|
| def _load_system_prompt() -> str: |
| """Load the system prompt template from prompts.yaml at the project root.""" |
| import yaml |
| |
| |
| here = os.path.dirname(os.path.abspath(__file__)) |
| for levels in (1, 2): |
| candidate = os.path.normpath(os.path.join(here, *[".."] * levels, "prompts.yaml")) |
| if os.path.exists(candidate): |
| with open(candidate, encoding="utf-8") as f: |
| data = yaml.safe_load(f) |
| return data["system_prompt"] |
| raise FileNotFoundError("prompts.yaml not found relative to core/constants.py") |
|
|
|
|
| SYSTEM_PROMPT_TEMPLATE = _load_system_prompt() |
|
|
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| DECOUPLER_DISCLAIMER = ( |
| "**Method limitations (decoupleR).** All TF and pathway values are " |
| "*inferred* regulon/gene-set activities derived from differential-expression " |
| "statistics via the ULM model — not direct measurements of protein activity, " |
| "nuclear localization, or pathway flux. ULM p-values are liberal and scale " |
| "with regulon size, so rank results by effect size rather than by how small " |
| "padj is. PROGENy: 14-pathway model. Regulons: CollecTRI. These outputs " |
| "require independent validation before any biological or clinical conclusion." |
| ) |
|
|