MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / __init__

Method __init__

openkb/skill/generator.py:60–90  ·  view source on GitHub ↗

Args: skill_name: For ``target_type="deck"``, which deck skill to use. Defaults to :data:`openkb.deck.creator.DEFAULT_DECK_SKILL` (``"openkb-deck-neon"``). Ignored for skill target.

(
        self,
        *,
        target_type: TargetType,
        name: str,
        intent: str,
        kb_dir: Path,
        model: str,
        critique: bool = False,
        skill_name: str | None = None,
    )

Source from the content-addressed store, hash-verified

58 """
59
60 def __init__(
61 self,
62 *,
63 target_type: TargetType,
64 name: str,
65 intent: str,
66 kb_dir: Path,
67 model: str,
68 critique: bool = False,
69 skill_name: str | None = None,
70 ) -> None:
71 """Args:
72 skill_name: For ``target_type="deck"``, which deck skill to use.
73 Defaults to :data:`openkb.deck.creator.DEFAULT_DECK_SKILL`
74 (``"openkb-deck-neon"``). Ignored for skill target.
75 """
76 if target_type not in ("skill", "deck"):
77 raise ValueError(
78 f"Unknown target_type {target_type!r}. v0.3 supports 'skill' and 'deck'."
79 )
80 self.target_type: TargetType = target_type
81 self.name = name
82 self.intent = intent
83 self.kb_dir = kb_dir
84 self.model = model
85 self.critique = critique
86 self.skill_name = skill_name or DEFAULT_DECK_SKILL
87 self.output_dir = (
88 deck_dir(kb_dir, name) if target_type == "deck" else skill_dir(kb_dir, name)
89 )
90 self.validation: AnyValidationResult | None = None
91
92 async def run(self) -> Path:
93 """Execute the generator. Returns the path to the produced artifact.

Callers

nothing calls this directly

Calls 2

deck_dirFunction · 0.90
skill_dirFunction · 0.90

Tested by

no test coverage detected