File size: 219 Bytes
dbb2933
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
import os
from langchain_openai import OpenAIEmbeddings
from dotenv import load_dotenv

load_dotenv()

def get_embeddings():
    return OpenAIEmbeddings(model='text-embedding-3-small', api_key=os.getenv("OPEN_API_KEY"))