class_docstr: A custom LLM class that integrates LLMs running on the ColossalCloud Platform
class_docstr_tok: ["A","custom","LLM","class","that","integrates","LLMs","running","on","the","ColossalCloud","Platform"]
docstr: Args:
      prompt: The prompt to pass into the model.
      stop: A list of strings to stop generation when encountered
  
  Returns:
      The string generated by the model        
docstr_tok: ["Args",":","prompt",":","The","prompt","to","pass","into","the","model",".","stop",":","A","list","of","strings","to","stop","generation","when","encountered","Returns",":","The","string","generated","by","the","model"]
code: def _call(self, prompt: str, stop=None, **kwargs: Any) -> str:
      """
      Args:
          prompt: The prompt to pass into the model.
          stop: A list of strings to stop generation when encountered
  
      Returns:
          The string generated by the model
      """
      # Update the generation arguments
      for key, value in kwargs.items():
          if key not in self.valid_gen_para:
              raise KeyError(
                  f"Invalid generation parameter: '{key}'. Valid keys are: {', '.join(self.valid_gen_para)}"
              )
          if key in self.gen_config:
              self.gen_config[key] = value
  
      resp_text = self.text_completion(
          prompt, self.gen_config, self.auth_config
      )
      # TODO: This may cause excessive tokens count
      if stop is not None:
          for stopping_words in stop:
              if stopping_words in resp_text:
                  resp_text = resp_text.split(stopping_words)[0]
      return resp_text
  
file_path: colossalai/applications/ColossalQA/colossalqa/local/colossalcloud_llm.py
imports: 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 5 for calling the ColossalCloudLLM obj's underlying member method code with example usage: obj._call(prompt, stop) and returns: resp_text