Repository navigation
Add the NWB Assistant chat widget to the docs - #891
Open
bendichter wants to merge 2 commits into
Open
bendichter wants to merge 2 commits into
bendichter wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #891 +/- ##
=======================================
Coverage 95.68% 95.68%
=======================================
Files 247 247
Lines 9418 9418
=======================================
Hits 9012 9012
Misses 406 406 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ehennestad
force-pushed
the
nwb-assistant-widget
branch
from
October 6, 2026 18:08
8a90eaa to
f521189
Compare
6 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Adds the NWB Assistant chat widget to these docs. The assistant is hosted by the
Open Science Assistant (OSA) as its
nwbcommunity(OpenScience-Collective/osa#514). It answers questions about NWB, PyNWB, HDMF, NeuroConv, NWB Inspector, MatNWB
and DANDI from their documentation, and links the pages it used. OSA's maintainers host and fund it, so these docs
no longer depend on a separately maintained assistant.
In a blind-graded comparison on 25 NWB questions, OSA's NWB assistant scored higher than the current NWB
Assistant and made fewer false claims about the APIs.
The change is two lines in
conf.py'shtml_js_files: OSA's widget script, and_static/js/nwb_assistant.js,which selects the NWB assistant before the widget initializes.
How to test the behavior?
Build the docs and open any page: a chat button appears in the bottom-right corner and opens the NWB Assistant.
On
localhostthe widget uses OSA's development backend. On*.readthedocs.ioit uses OSA's production backend,where the NWB Assistant has been available since OSA v0.8.16,
which also allows this docs site to use the widget.
I checked the production path in headless Chromium with a test page served as
https://matnwb.readthedocs.iothat loads thesame two scripts: the widget loaded the
nwbcommunity from OSA's production backend. From a page served ashttps://pynwb.readthedocs.io, it also answered a question and cited the PyNWB docs page it used. Read the Docs PRpreviews (
*.readthedocs.build) are not on OSA's allowlist, so the widget won't answer there.Checklist