class_docstr: (openai<1) A class for OpenAI completion API.
  
  It also supports: ChatCompletion, Azure OpenAI API.
docstr: Get the params for the openai api call from a config in the search space.
code: def _get_params_for_create(cls, config: Dict) -> Dict:
      """Get the params for the openai api call from a config in the search space."""
      params = cls._pop_subspace(config)
      if cls._prompts:
          params["prompt"] = cls._prompts[config["prompt"]]
      else:
          params["messages"] = cls._messages[config["messages"]]
      if "stop" in params:
          params["stop"] = cls._stops and cls._stops[params["stop"]]
      temperature_or_top_p = params.pop("temperature_or_top_p", None)
      if temperature_or_top_p:
          params.update(temperature_or_top_p)
      if cls._config_list and "config_list" not in params:
          params["config_list"] = cls._config_list
      return params
  
imports: from time import sleep
  import logging
  import time
  from typing import List, Optional, Dict, Callable, Union
  import sys
  import shutil
  import numpy
  from flaml import tune, BlendSearch
  from flaml.tune.space import is_constant
  from flaml.automl.logger import logger_formatter
  from .openai_utils import get_key
  from collections import defaultdict
label_desc: Use image node_id 10 for calling the Completion obj's underlying member method code with example usage: obj._get_params_for_create(cls, config) and returns: params