import os from langchain.embeddings import OpenAIEmbeddings # Function to generate title and Logline from simple chaining def generate_vector(prompt, api_key): os.environ["OPENAI_API_KEY"] = api_key embeddings = OpenAIEmbeddings() text_embedding = embeddings.embed_query(prompt) return text_embedding