frenchlaw / src /setup.py
Ferdi's picture
logs
d24af38
raw
history blame contribute delete
582 Bytes
from conversation import Conversation_RAG
from vector_index import *
from pinecone import Pinecone
pinecone_api_key = os.environ.get("PINECONE_API_KEY")
class ModelSetup:
def __init__(self, model_name):
self.model_name = model_name
def setup(self):
conv_rag = Conversation_RAG(self.model_name)
print(f"pc api key: {pinecone_api_key}")
pc = Pinecone(
api_key=pinecone_api_key,
)
self.vectordb = conv_rag.get_vectordb(pc)
self.pipeline = conv_rag.create_model()
return "Model Setup Complete"