class_docstr: Wrapper around the BigDL-LLM
  
  Example:
      .. code-block:: python
  
          from langchain.llms import LlamaLLM
          llm = LlamaLLM(model_path="/path/to/llama/model")
docstr: Validate that bigdl-llm is installed, family is supported
docstr_tok: ["Validate","that","bigdl-llm","is","installed",",","family","is","supported"]
code: def validate_environment(cls, values: Dict) -> Dict:
      """Validate that bigdl-llm is installed, family is supported"""
  
      native = values["native"]
      model_path = values["model_path"]
      model_kwargs = values["model_kwargs"]
      kwargs = values["kwargs"]
      model_param_names = [
          "lora_path",
          "lora_base",
          "n_ctx",
          "n_parts",
          "seed",
          "f16_kv",
          "logits_all",
          "vocab_only",
          "use_mlock",
          "n_threads",
          "n_batch",
          "use_mmap",
          "last_n_tokens_size",
      ]
      model_params = {k: values[k] for k in model_param_names}
      # For backwards compatibility, only include if non-null.
      if values["n_gpu_layers"] is not None:
          model_params["n_gpu_layers"] = values["n_gpu_layers"]
  
      try:
          module = importlib.import_module(values["ggml_module"])
          class_ = getattr(module, values["ggml_model"])
          if native:
              values["client"] = class_(model_path, **model_params)
          else:
              kwargs = {} if kwargs is None else kwargs
              values["client"] = TransformersLLM.from_model_id(
                  model_path, model_kwargs, **kwargs
              )
  
      except ImportError:
          raise ModuleNotFoundError(
              "Could not import bigdl-llm library. "
              "Please install the bigdl-llm library to "
              "use this embedding model: pip install bigdl-llm"
          )
      except Exception as e:
          raise ValueError(
              f"Could not load model from path: {model_path}. "
              f"Please make sure the model embedding class matches "
              "the model you want to load."
              f"Received error {e}"
          )
  
      return values
  
imports: import logging
  import importlib
  from typing import Any, Dict, Generator, List, Optional
  from pydantic import Field, root_validator
  from langchain.callbacks.manager import CallbackManagerForLLMRun
  from langchain.llms.base import LLM
  from .transformersllm import TransformersLLM
label_desc: Use image node_id 1 for calling the _BaseCausalLM obj's underlying member method code with example usage: obj.validate_environment(cls, values) and returns: values