File size: 663 Bytes
95613e0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b947dc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from langchain_openai import ChatOpenAI
from langchain_openai import OpenAIEmbeddings

import os
from dotenv import load_dotenv
load_dotenv()

# os.environ["OPENAI_API_KEY"] = os.getenv("OPENAI_API_KEY")
os.environ["OPENAI_API_KEY"] = "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"
model_name = os.getenv("MODEL_NAME")
mini_model_name = os.getenv("MINI_MODEL_NAME")
embedding_model = os.getenv("EMBEDDING_MODEL")

llm = ChatOpenAI(model=model_name)
llm2 = ChatOpenAI(model=mini_model_name)

embeddings = OpenAIEmbeddings(model=embedding_model)