Skip to content

ui

Classes:

Functions:

NotebookDependencyError

Bases: ImportError

show

show(
    data_dir: str | Path | None = None,
    *,
    session_path: str | Path | None = None,
    language: str = 'en',
    runner: StageRunner | None = None,
    llm: StructuredLLM | None = None,
    llm_settings: LLMSettings | None = None,
) -> object

Optional notebook dependencies are imported lazily so that from hiperhealth.notebook import ui remains safe in a base install. parameters: data_dir: type: str | Path | None session_path: type: str | Path | None language: type: str runner: type: StageRunner | None llm: type: StructuredLLM | None llm_settings: type: LLMSettings | None returns: type: object

Source code in src/hiperhealth/notebook/ui.py
def show(
    data_dir: str | Path | None = None,
    *,
    session_path: str | Path | None = None,
    language: str = 'en',
    runner: StageRunner | None = None,
    llm: StructuredLLM | None = None,
    llm_settings: LLMSettings | None = None,
) -> object:
    """
    title: Display the HiperHealth notebook UI.
    summary: |-
      Optional notebook dependencies are imported lazily so that
      ``from hiperhealth.notebook import ui`` remains safe in a base install.
    parameters:
      data_dir:
        type: str | Path | None
      session_path:
        type: str | Path | None
      language:
        type: str
      runner:
        type: StageRunner | None
      llm:
        type: StructuredLLM | None
      llm_settings:
        type: LLMSettings | None
    returns:
      type: object
    """
    notebook_ui_cls = _load_notebook_ui()
    controller = NotebookController(
        data_dir=data_dir,
        session_path=session_path,
        language=language,
        runner=runner,
    )
    notebook_ui: _NotebookWidget = notebook_ui_cls(
        controller=controller,
        llm=llm,
        llm_settings=llm_settings,
    )
    notebook_ui.display()
    return notebook_ui