class_docstr: A component for embedding strings using OpenAI models.
  
  Usage example:
  ```python
  from haystack.components.embedders import OpenAITextEmbedder
  
  text_to_embed = "I love pizza!"
  
  text_embedder = OpenAITextEmbedder()
  
  print(text_embedder.run(text_to_embed))
  
  # {'embedding': [0.017020374536514282, -0.023255806416273117, ...],
  # 'meta': {'model': 'text-embedding-ada-002-v2',
  #          'usage': {'prompt_tokens': 4, 'total_tokens': 4}}}
  ```
docstr: Create an OpenAITextEmbedder component.
  
  :param api_key: The OpenAI API key. It can be explicitly provided or automatically read from the
      environment variable OPENAI_API_KEY (recommended).
  :param model: The name of the OpenAI model to use. For more details on the available models,
      see [OpenAI documentation](https://platform.openai.com/docs/guides/embeddings/embedding-models).
  :param organization: The Organization ID, defaults to `None`. See
  [production best practices](https://platform.openai.com/docs/guides/production-best-practices/setting-up-your-organization).
  :param api_base_url: The OpenAI API Base url, defaults to None. For more details, see OpenAI [docs](https://platform.openai.com/docs/api-reference/audio).
  :param prefix: A string to add to the beginning of each text.
  :param suffix: A string to add to the end of each text.
docstr_tok: ["Create","an","OpenAITextEmbedder","component",".",":","param","api_key",":","The","OpenAI","API","key",".","It","can","be","explicitly","provided","or","automatically","read","from","the","environment","variable","OPENAI_API_KEY","(","recommended",")",".",":","param","model",":","The","name","of","the","OpenAI","model","to","use",".","For","more","details","on","the","available","models",",","see","[","OpenAI","documentation","]","(","https",":","\/\/platform.openai.com\/docs\/guides\/embeddings\/embedding-models",")",".",":","param","organization",":","The","Organization","ID",",","defaults","to","`","None","`",".","See","[","production","best","practices","]","(","https",":","\/\/platform.openai.com\/docs\/guides\/production-best-practices\/setting-up-your-organization",")",".",":","param","api_base_url",":","The","OpenAI","API","Base","url",",","defaults","to","None",".","For","more","details",",","see","OpenAI","[","docs","]","(","https",":","\/\/platform.openai.com\/docs\/api-reference\/audio",")",".",":","param","prefix",":","A","string","to","add","to","the","beginning","of","each","text",".",":","param","suffix",":","A","string","to","add","to","the","end","of","each","text","."]
code: def __init__(
      self,
      api_key: Optional[str] = None,
      model: str = "text-embedding-ada-002",
      api_base_url: Optional[str] = None,
      organization: Optional[str] = None,
      prefix: str = "",
      suffix: str = "",
  ):
      """
      Create an OpenAITextEmbedder component.
  
      :param api_key: The OpenAI API key. It can be explicitly provided or automatically read from the
          environment variable OPENAI_API_KEY (recommended).
      :param model: The name of the OpenAI model to use. For more details on the available models,
          see [OpenAI documentation](https://platform.openai.com/docs/guides/embeddings/embedding-models).
      :param organization: The Organization ID, defaults to `None`. See
      [production best practices](https://platform.openai.com/docs/guides/production-best-practices/setting-up-your-organization).
      :param api_base_url: The OpenAI API Base url, defaults to None. For more details, see OpenAI [docs](https://platform.openai.com/docs/api-reference/audio).
      :param prefix: A string to add to the beginning of each text.
      :param suffix: A string to add to the end of each text.
      """
      self.model = model
      self.organization = organization
      self.prefix = prefix
      self.suffix = suffix
  
      self.client = OpenAI(
          api_key=api_key,
          organization=organization,
          base_url=api_base_url,
      )
  
imports: from typing import List, Optional, Dict, Any
  from openai import OpenAI
  from haystack import component, default_to_dict
label_desc: Use image node_id 1 to create a new OpenAITextEmbedder object  with example: obj = OpenAITextEmbedder(api_key, model, api_base_url, organization, prefix, suffix)