class_docstr: A component for computing Document embeddings using OpenAI models.
  The embedding of each Document is stored in the `embedding` field of the Document.
  
  Usage example:
  ```python
  from haystack import Document
  from haystack.components.embedders import OpenAIDocumentEmbedder
  
  doc = Document(content="I love pizza!")
  
  document_embedder = OpenAIDocumentEmbedder()
  
  result = document_embedder.run([doc])
  print(result['documents'][0].embedding)
  
  # [0.017020374536514282, -0.023255806416273117, ...]
  ```
docstr: This method overrides the default serializer in order to avoid leaking the `api_key` value passed
  to the constructor.
docstr_tok: ["This","method","overrides","the","default","serializer","in","order","to","avoid","leaking","the","`","api_key","`","value","passed","to","the","constructor","."]
code: def to_dict(self) -> Dict[str, Any]:
      """
      This method overrides the default serializer in order to avoid leaking the `api_key` value passed
      to the constructor.
      """
      return default_to_dict(
          self,
          model=self.model,
          organization=self.organization,
          api_base_url=self.api_base_url,
          prefix=self.prefix,
          suffix=self.suffix,
          batch_size=self.batch_size,
          progress_bar=self.progress_bar,
          meta_fields_to_embed=self.meta_fields_to_embed,
          embedding_separator=self.embedding_separator,
      )
  
file_path: haystack/haystack/components/embedders/openai_document_embedder.py
imports: from typing import List, Optional, Dict, Any, Tuple
  from openai import OpenAI
  from tqdm import tqdm
  from haystack import component, Document, default_to_dict
label_desc: Use image node_id 3 for calling the OpenAIDocumentEmbedder obj's underlying member method code with example usage: obj.to_dict() and returns: default_to_dict