|
|
from utils import * |
|
|
|
|
|
|
|
|
try: |
|
|
print("Loading vector store...") |
|
|
vector_store = load_company_vector_store() |
|
|
if vector_store: |
|
|
print("Vector store loaded successfully") |
|
|
else: |
|
|
|
|
|
print("Vector store not found, creating new...") |
|
|
company_documents = create_company_documents() |
|
|
company_chunks = split_documents(company_documents) |
|
|
vector_store = create_company_vector_store(company_chunks) |
|
|
print("Vector store created successfully") |
|
|
except Exception as e: |
|
|
|
|
|
logger.error(f"Error loading or creating vector store: {str(e)}") |
|
|
|
|
|
|
|
|
raise |
|
|
|
|
|
|
|
|
|