Skip to content

Add OSA chat widget to documentation#13702

Open
neuromechanist wants to merge 2 commits intomne-tools:mainfrom
neuromechanist:add-osa-chat-widget
Open

Add OSA chat widget to documentation#13702
neuromechanist wants to merge 2 commits intomne-tools:mainfrom
neuromechanist:add-osa-chat-widget

Conversation

@neuromechanist
Copy link
Contributor

Summary

  • Adds the Open Science Assistant (OSA) chat widget to the MNE-Python documentation
  • The widget provides an AI assistant specialized in MNE-Python that can help users with MEG, EEG, and neurophysiological data analysis questions
  • Loads the widget script from the OSA CDN and configures it with 3 suggested questions

Details

The widget is a lightweight floating chat button that appears on all documentation pages. It:

  • Uses the mne community configuration from OSA
  • Shows 3 suggested starter questions relevant to MNE-Python users
  • Supports page context awareness (sends current page URL to help provide contextually relevant answers)
  • Is non-intrusive; users can dismiss or ignore it

The widget is served from demo.osc.earth and configured via the communityId: 'mne' setting, which auto-configures the API endpoint, title, theme color, and initial greeting.

Test plan

  • CORS origins for mne.tools and *.mne.tools are enabled on the OSA backend
  • Verify widget loads on local Sphinx build (make html)
  • Verify chat responses work end-to-end
  • Check widget appearance on mobile viewports

@welcome
Copy link

welcome bot commented Feb 27, 2026

Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴

@neuromechanist
Copy link
Contributor Author

Hi maintainers! Could someone approve the CircleCI pipeline? It requires maintainer approval for first-time contributors from forks.

Also, if you'd like to customize the widget further (e.g., adding your own logo), you can pass additional options to OSAChatWidget.setConfig(). For example:

OSAChatWidget.setConfig({
  communityId: 'mne',
  logo: 'https://mne.tools/stable/_static/mne_logo.svg',
  suggestedQuestions: [...]
});

Full configuration reference: https://docs.osc.earth/osa/deployment/widget/#full-configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant