code: def __init__(
      self,
      engine="mert-DaVinci002",
      format_fn=None,
      encoding="p50k_base",
      api_settings=None,
  ):
      if api_settings is not None:
          openai.api_type = api_settings.get("api_type")
          openai.api_base = api_settings.get("api_base")
          openai.api_version = api_settings.get("api_version")
          openai.api_key = api_settings.get("api_key")
      self.engine = engine
      self.tokenizer = tiktoken.get_encoding(encoding)
      self.format_fn = (
          format_fn if format_fn is not None else (lambda x: x)
      )
  
file_path: interpret-text/python/interpret_text/generative/model_lib/openai_tooling.py
imports: import tiktoken
  import openai
  from tqdm import tqdm
  import time
  import torch
  import numpy
  from scipy.special import logsumexp, log_softmax
label_desc: Use image node_id 1 to create a new CompletionsOpenAI object  with example: obj = CompletionsOpenAI(engine, format_fn, encoding, api_settings)