Skip to content

Mind map generation ignores language and instructions parameters #250

@teng-lin

Description

@teng-lin

Problem

generate_mind_map() does not accept language or instructions parameters, unlike every other artifact generation method (audio, video, report, slides, infographic, etc.). The payload has hardcoded static values:

["interactive_mindmap", [["[CONTEXT]", ""]], ""]

This means mind maps are always generated in English with no custom instructions.

Expected behavior

generate_mind_map() should accept language and instructions parameters, consistent with other generation methods, and pass them into the RPC payload.

Fix

Based on the RPC payload structure, language goes at params[5][2] and instructions at params[5][1][0][1]:

 async def generate_mind_map(
     self,
     notebook_id: str,
     source_ids: list[str] | None = None,
+    language: str = "en",
+    instructions: str | None = None,
 ) -> dict[str, Any]:
-["interactive_mindmap", [["[CONTEXT]", ""]], ""]
+["interactive_mindmap", [["[CONTEXT]", instructions or ""]], language]

The CLI generate command should also expose --language and --instructions flags for mind maps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions