class_docstr: API for calling LLM.generate
code: def get_api(model_type: str, model_path: str, ckpt_path: str = None):
      if (
          model_type + model_path + (ckpt_path or "")
          in ColossalAPI.__instances
      ):
          return ColossalAPI.__instances[
              model_type + model_path + (ckpt_path or "")
          ]
      else:
          return ColossalAPI(model_type, model_path, ckpt_path)
  
imports: from typing import Any, List, Mapping, Optional
  import torch
  from colossalqa.local.utils import get_response, post_http_request
  from colossalqa.mylogging import get_logger
  from langchain.callbacks.manager import CallbackManagerForLLMRun
  from langchain.llms.base import LLM
  from transformers import AutoModelForCausalLM, AutoTokenizer
label_desc: Use image node_id 2 for calling the ColossalAPI obj's underlying member method code with example usage: obj.get_api(model_type, model_path, ckpt_path) and returns: ColossalAPI, ColossalAPI