code: def __init__(
      self,
      model: Optional[str] = None,
      api_base: Optional[str] = None,
      api_key: Optional[str] = None,
      n_ctx: Optional[int] = None,
      extra_options: Optional[dict] = {},
      **kwargs,
  ):
      self.model = model
      self.api_base = api_base
      self.api_key = api_key
      self.n_ctx = n_ctx
      self.extra_options = extra_options
  
imports: from typing import Any, Optional, Union
  from openai import OpenAI
  from evals.api import CompletionFn, CompletionResult
  from evals.base import CompletionFnSpec
  from evals.prompt.base import ChatCompletionPrompt, CompletionPrompt, OpenAICreateChatPrompt, OpenAICreatePrompt, Prompt
  from evals.record import record_sampling
  from evals.utils.api_utils import openai_chat_completion_create_retrying, openai_completion_create_retrying
label_desc: Use image node_id 1 to create a new OpenAICompletionFn object from inherited base classes: CompletionFn with example: obj = OpenAICompletionFn(model, api_base, api_key, n_ctx, extra_options)