code: def __init__(self, template_name: str = "", verbose: bool = False):
      self._verbose = verbose
      if not template_name:
          template_name = "alpaca"
      file_name = osp.join("templates", f"{template_name}.json")
      if not osp.exists(file_name):
          raise ValueError(f"Can't read {file_name}")
      with open(file_name) as fp:
          self.template = json.load(fp)
      if self._verbose:
          print(
              f"Using prompt template {template_name}: {self.template['description']}"
          )
  
file_path: DeepKE/example/llm/InstructKGC/src/utils/prompter.py
imports: import json
  import os.path
  from typing import Union
label_desc: Use image node_id 1 to create a new Prompter object from inherited base classes: object with example: obj = Prompter(template_name, verbose)