Skip to content

Feature: Mult-kernel support for any installed and registered Jupyter kernel#4

Open
mattshu0410 wants to merge 1 commit intogoodfire-ai:mainfrom
mattshu0410:add-R
Open

Feature: Mult-kernel support for any installed and registered Jupyter kernel#4
mattshu0410 wants to merge 1 commit intogoodfire-ai:mainfrom
mattshu0410:add-R

Conversation

@mattshu0410
Copy link

Overall purpose is to allow the tool to handle any Jupyter kernel not just Python. Lots of good visualisation and high-throughput sequencing packages are written in R under the BioConductor project. Working autonomously with them would be a good unlock.

  1. get_notebook_metadata_for_kernel replaces the previous approach of hardcoding Python 3.11 metadata in new sessions. It queries the Jupyter's KernelSpecManager. If the language model fails to infer the correct kernel name, the function returns the registered kernels, allowing the language model to pick the right one on the next turn.
  2. kernel_name parameter for HTTP handler and server, MCP tool parameters
  3. kernel_name and kernel_display_name (label for the session) are now separate in API responses.

Still defaults to Python so backwards compatible. Default MCP tool request launches Python notebook.

Tested on IRkernel, Julia and Python.

Of course, open to any suggestions for improvement.

… kernel.

kernel_name param carried through MCP tool, HTTP handler and server.

Replace hardcoded notebook metadata with dynamic lookup of kernel spec and language info.

kernel_name (spec identifier) and kernel_display_name (label for the session) are now separate in API responses. Still defaults to Python so backwards compatible.
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