moa.py 984 B

12345678910111213141516171819
  1. """``hermes moa`` subcommand parser."""
  2. from __future__ import annotations
  3. def build_moa_parser(subparsers) -> None:
  4. """Attach the ``moa`` subcommand to ``subparsers``."""
  5. from hermes_cli.moa_cmd import cmd_moa
  6. moa_parser = subparsers.add_parser(
  7. "moa", help="Configure Mixture of Agents provider/model slots",
  8. description="Configure the provider/model set used by /moa <prompt>.")
  9. moa_subparsers = moa_parser.add_subparsers(dest="moa_command")
  10. moa_subparsers.add_parser("list", aliases=["ls"], help="Show current MoA model slots")
  11. moa_configure = moa_subparsers.add_parser("configure", aliases=["config"], help="Interactively pick MoA models")
  12. moa_configure.add_argument("name", nargs="?", help="Preset name to create or update")
  13. moa_delete = moa_subparsers.add_parser("delete", aliases=["rm"], help="Delete a MoA preset")
  14. moa_delete.add_argument("name", help="Preset name to delete")
  15. moa_parser.set_defaults(func=cmd_moa)