From d1d4f5b5741550f711dee0c87433634c6f5d67b4 Mon Sep 17 00:00:00 2001 From: Adam Wright Date: Thu, 10 Sep 2026 15:11:53 +0000 Subject: [PATCH] Ship the Reactome welcome screen; mount the Plant Reactome one main shipped the Plant Reactome welcome text, so the Reactome deployment greeted users with a screen naming the wrong knowledgebase -- "your interactive chatbot for exploring Plant Reactome!" on reactome.org. chainlit renders chainlit.md from CHAINLIT_APP_ROOT at startup, and /app is read-only in the image, so there is nothing for the application to choose at runtime. The deployment selects instead: the image ships the Reactome page, and Plant Reactome mounts chainlit.plantreactome.md over it, exactly as config.yml is already overridden. compose.yaml carries the commented mount line for both services. The Reactome text is the one from the security-improvements branch, which is where it had been sitting. --- chainlit.md | 38 ++++++++++++----------------- chainlit.plantreactome.md | 44 ++++++++++++++++++++++++++++++++++ compose.yaml | 7 ++++++ tests/test_welcome_pages.py | 48 +++++++++++++++++++++++++++++++++++++ 4 files changed, 114 insertions(+), 23 deletions(-) create mode 100644 chainlit.plantreactome.md create mode 100644 tests/test_welcome_pages.py diff --git a/chainlit.md b/chainlit.md index 0057c914..3a9391b7 100644 --- a/chainlit.md +++ b/chainlit.md @@ -1,44 +1,36 @@ -# React-to-me +# React-to-Me -Welcome to React-to-me, your interactive chatbot for exploring Plant Reactome! +Welcome to React-to-Me, your interactive chatbot for exploring Reactome! ## About -React-to-me is a specialized chatbot designed to provide fast and reliable answers about biological pathways and processes from the Plant Reactome knowledgebase. Whether you're a researcher, student, or just curious about biology, React-to-me can help you access and understand complex biological information quickly and efficiently. +React-to-Me is a specialized chatbot designed to provide fast and reliable answers about biological pathways and processes from the Reactome knowledgebase. Whether you're a researcher, student, or just curious about biology, React-to-Me can help you access and understand complex biological information quickly and efficiently. ## Features -With Plant Reactome Chatbot, you can: +With Reactome Chatbot, you can: - Ask questions about biological pathways and get responses in real-time. -- Browse through Plant Reactome's extensive collection of pathways and related content. +- Browse through Reactome's extensive collection of pathways and related content. - Access information in multiple languages, allowing you to ask questions and receive information in your preferred language. ## How to Use -Simply type your question about any Plant Reactome content directly into the chat window, and the chatbot will provide you with detailed answers accompanied by links to relevant pages within the Plant Reactome portal. +Simply type your question about any Reactome content directly into the chat window, and the chatbot will provide you with detailed answers accompanied by links to relevant pages within the Reactome portal. -Feel free to explore any topic within Plant Reactome's database. Whether your questions are broad or highly specific, the chatbot will do its best to provide you with accurate and helpful responses! +Feel free to explore any topic within Reactome's database. Whether your questions are broad or highly specific, the chatbot will do its best to provide you with accurate and helpful responses! ## Pathway Recommendations Explore pathways such as: -- Circadian rhythm -- Mitosis -- Detoxification -- Root gravitropism +- Cell Cycle +- Glycolysis +- Apoptosis +- Signal Transduction ## Additional Resources -- [Plant Reactome Website](https://plantreactome.gramene.org/) -- [Plant Reactome GitHub Repository](https://github.com/plantreactome) -- [Planteome Twitter](https://twitter.com/planteome) +- [Reactome Website](https://reactome.org/) +- [Reactome GitHub Repository](https://github.com/reactome) +- [Reactome Twitter](https://twitter.com/reactome) -Happy exploring with React-to-me! - -## _Disclaimer_ - -_This chatbot uses large language model (LLM) technology to assist with questions about the Reactome Knowledgebase. Responses are generated automatically and may contain inaccuracies, outdated information or speculative language._ - -_The information you provide may be retained in accordance with Reactome’s AI provider’s retention policy, which is located [here](https://openai.com/enterprise-privacy/). Do not share sensitive, personal or confidential information._ - -_The chatbot does not substitute for expert curation or peer-reviewed sources and is not a suitable resource for clinical decisions. Users are responsible for validating any output before using it for research, publication, or medical decisions. Any use of this chatbot is subject to Plant Reactome’s [disclaimer](https://plantreactome.gramene.org/index.php?option=com_content&view=article&id=17&Itemid=254&lang=en)._ +Happy exploring with React-to-Me! diff --git a/chainlit.plantreactome.md b/chainlit.plantreactome.md new file mode 100644 index 00000000..0057c914 --- /dev/null +++ b/chainlit.plantreactome.md @@ -0,0 +1,44 @@ +# React-to-me + +Welcome to React-to-me, your interactive chatbot for exploring Plant Reactome! + +## About + +React-to-me is a specialized chatbot designed to provide fast and reliable answers about biological pathways and processes from the Plant Reactome knowledgebase. Whether you're a researcher, student, or just curious about biology, React-to-me can help you access and understand complex biological information quickly and efficiently. +## Features + +With Plant Reactome Chatbot, you can: +- Ask questions about biological pathways and get responses in real-time. +- Browse through Plant Reactome's extensive collection of pathways and related content. +- Access information in multiple languages, allowing you to ask questions and receive information in your preferred language. + +## How to Use + +Simply type your question about any Plant Reactome content directly into the chat window, and the chatbot will provide you with detailed answers accompanied by links to relevant pages within the Plant Reactome portal. + +Feel free to explore any topic within Plant Reactome's database. Whether your questions are broad or highly specific, the chatbot will do its best to provide you with accurate and helpful responses! + + +## Pathway Recommendations + +Explore pathways such as: +- Circadian rhythm +- Mitosis +- Detoxification +- Root gravitropism + +## Additional Resources + +- [Plant Reactome Website](https://plantreactome.gramene.org/) +- [Plant Reactome GitHub Repository](https://github.com/plantreactome) +- [Planteome Twitter](https://twitter.com/planteome) + +Happy exploring with React-to-me! + +## _Disclaimer_ + +_This chatbot uses large language model (LLM) technology to assist with questions about the Reactome Knowledgebase. Responses are generated automatically and may contain inaccuracies, outdated information or speculative language._ + +_The information you provide may be retained in accordance with Reactome’s AI provider’s retention policy, which is located [here](https://openai.com/enterprise-privacy/). Do not share sensitive, personal or confidential information._ + +_The chatbot does not substitute for expert curation or peer-reviewed sources and is not a suitable resource for clinical decisions. Users are responsible for validating any output before using it for research, publication, or medical decisions. Any use of this chatbot is subject to Plant Reactome’s [disclaimer](https://plantreactome.gramene.org/index.php?option=com_content&view=article&id=17&Itemid=254&lang=en)._ diff --git a/compose.yaml b/compose.yaml index 0c582c3a..e5852754 100644 --- a/compose.yaml +++ b/compose.yaml @@ -39,6 +39,12 @@ services: - TAVILY_API_KEY volumes: - ./config.yml:/app/config.yml:ro + # Welcome screen. The image ships the Reactome one at /app/chainlit.md; + # the Plant Reactome deployment mounts its variant over it, the same way + # config.yml is overridden above. chainlit reads this file from + # CHAINLIT_APP_ROOT at startup, and /app is read-only, so selecting it by + # mount is the mechanism -- there is nothing for the application to do. + # - ./chainlit.plantreactome.md:/app/chainlit.md:ro - ./embeddings:/app/embeddings - ./records:/app/records - postgres-socket:/sockets/postgres @@ -72,6 +78,7 @@ services: - TAVILY_API_KEY volumes: - ./config.yml:/app/config.yml:ro + # - ./chainlit.plantreactome.md:/app/chainlit.md:ro # see above - ./embeddings:/app/embeddings - postgres-socket:/sockets/postgres - vault-postgres-app-token:/tokens/postgres-app:ro diff --git a/tests/test_welcome_pages.py b/tests/test_welcome_pages.py new file mode 100644 index 00000000..0649a756 --- /dev/null +++ b/tests/test_welcome_pages.py @@ -0,0 +1,48 @@ +"""The two welcome screens, and which one the image ships. + +chainlit renders `chainlit.md` from CHAINLIT_APP_ROOT at startup. /app is +read-only in the image, so a deployment selects its variant by mounting one over +the other -- the same mechanism config.yml already uses. That means the file +names and their contents are the interface, and this pins them. +""" + +from pathlib import Path + +import pytest + +REPO_ROOT = Path(__file__).parent.parent +DEFAULT = REPO_ROOT / "chainlit.md" +PLANT = REPO_ROOT / "chainlit.plantreactome.md" + + +def test_both_welcome_pages_exist() -> None: + assert DEFAULT.exists(), "the image ships this one" + assert PLANT.exists(), "and this is mounted over it for Plant Reactome" + + +def test_the_shipped_default_is_the_reactome_one() -> None: + """The image is built for Reactome; Plant Reactome overrides by mount. + + This was the other way round: main shipped the Plant Reactome text, so the + Reactome deployment showed a welcome screen naming the wrong knowledgebase. + """ + text = DEFAULT.read_text() + assert "Plant Reactome" not in text + assert "exploring Reactome" in text + + +def test_the_plant_variant_names_plant_reactome() -> None: + assert "Plant Reactome" in PLANT.read_text() + + +def test_the_dockerfile_ships_the_default_and_not_the_variant() -> None: + """Shipping both would make it ambiguous which one is in effect.""" + dockerfile = (REPO_ROOT / "Dockerfile").read_text() + assert "COPY --chown=appuser --chmod=400 chainlit.md /app/" in dockerfile + assert "chainlit.plantreactome.md" not in dockerfile + + +@pytest.mark.parametrize("page", [DEFAULT, PLANT]) +def test_neither_page_is_empty(page: Path) -> None: + """chainlit treats an empty chainlit.md as "no welcome screen".""" + assert page.read_text().strip()