class_docstr: Use OpenAI SDK to interact with OpenAI APIs.
  
  .. seealso:: https://platform.openai.com/docs/introduction/overview
  
  :param conn_id: :ref:`OpenAI connection id <howto/connection:openai>`
class_docstr_tok: ["Use","OpenAI","SDK","to","interact","with","OpenAI","APIs",".","..","seealso",":",":","https",":","\/\/platform.openai.com\/docs\/introduction\/overview",":","param","conn_id",":",":","ref",":","`","OpenAI","connection","id","<","howto\/connection",":","openai",">","`"]
docstr: Generate embeddings for the given text using the given model.
  
  :param text: The text to generate embeddings for.
  :param model: The model to use for generating embeddings.
docstr_tok: ["Generate","embeddings","for","the","given","text","using","the","given","model",".",":","param","text",":","The","text","to","generate","embeddings","for",".",":","param","model",":","The","model","to","use","for","generating","embeddings","."]
code: def create_embeddings(
      self,
      text: str | list[str] | list[int] | list[list[int]],
      model: str = "text-embedding-ada-002",
      **kwargs: Any,
  ) -> list[float]:
      """Generate embeddings for the given text using the given model.
  
      :param text: The text to generate embeddings for.
      :param model: The model to use for generating embeddings.
      """
      response = self.conn.embeddings.create(
          model=model, input=text, **kwargs
      )
      embeddings: list[float] = response.data[0].embedding
      return embeddings
  
file_path: airflow/airflow/providers/openai/hooks/openai.py
imports: from __future__ import annotations
  from functools import cached_property
  from typing import Any
  from openai import OpenAI
  from airflow.hooks.base import BaseHook
label_desc: Use image node_id 6 for calling the OpenAIHook obj's underlying member method code with example usage: obj.create_embeddings(text, model) and returns: embeddings