docstr: Load OpenAI LLM API interface
docstr_tok: ["Load","OpenAI","LLM","API","interface"]
code: def load_openai_llm(self) -> partial:
      """Load OpenAI LLM API interface"""
      client = openai.OpenAI(api_key=self.config_dict["openai_api_key"])
      config = self.config_dict.copy()
      config.pop("openai_api_key")
      config["model"] = config.pop("model_id")
  
      return partial(client.completions.create, **config)
  
imports: import json
  from dataclasses import dataclass
  from functools import lru_cache, partial
  from typing import Any, Dict, List, Union
  import html2text
  import openai
  import pandas
  import requests
  import writer
  from langchain import Writer
  from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
  from langchain.docstore.document import Document
  from langchain.document_loaders import DataFrameLoader
  from langchain.embeddings.base import Embeddings
  from langchain.embeddings.huggingface import HuggingFaceEmbeddings
  from langchain.vectorstores import FAISS, Chroma, VectorStore
  from pydantic import BaseModel, Extra, Field, validator
  from mindsdb.integrations.handlers.chromadb_handler.chromadb_handler import get_chromadb
  from mindsdb.integrations.handlers.rag_handler.exceptions import InvalidOpenAIModel, InvalidPromptTemplate, InvalidWriterModel, UnsupportedLLM, UnsupportedVectorStore
label_desc: Use image node_id 3 for calling the LLMLoader obj's underlying member method code with example usage: obj.load_openai_llm() and returns: partial