mindroot.coreplugins.persona.init_persona - MindRoot 9.10.0 documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
Toggle table of contents sidebar

# Source code for mindroot.coreplugins.persona.init_persona

    import os
    import shutil
    import json
    from pathlib import Path

    def init_persona():
        script_path = Path(__file__).parent
        assistant = script_path / "Assistant"
        personas_path = Path("personas/local/")
        if not personas_path.exists():
            os.makedirs(personas_path)
        if not (personas_path / "Assistant").exists():
            shutil.copytree(assistant, personas_path / "Assistant")

    init_persona()