class_docstr: A custom LLM class that integrates pangu models
code: def chat_model(self, messages, gen_config, auth_config):
      conn = http.client.HTTPSConnection(auth_config["endpoint"])
      payload = json.dumps(
          {
              "messages": messages,
              "user": gen_config["user"],
              "max_tokens": gen_config["max_tokens"],
              "temperature": gen_config["temperature"],
              "n": gen_config["n"],
          }
      )
      headers = {
          "X-Auth-Token": auth_config["auth_token"],
          "Content-Type": "application/json",
      }
      conn.request(
          "POST", auth_config["resource_path"], payload, headers
      )
      res = conn.getresponse()
      data = res.read()
      data = json.loads(data.decode("utf-8"))
      return data
  
file_path: ColossalAI/applications/ColossalQA/colossalqa/local/pangu_llm.py
imports: import http.client
  import json
  from typing import Any, List, Mapping, Optional
  import requests
  from langchain.llms.base import LLM
  from langchain.utils import get_from_dict_or_env
label_desc: Use image node_id 8 for calling the Pangu obj's underlying member method code with example usage: obj.chat_model(messages, gen_config, auth_config) and returns: data