pvanand commited on
Commit
2afa572
·
verified ·
1 Parent(s): aceb069

Update rag_routerv2.py

Browse files
Files changed (1) hide show
  1. rag_routerv2.py +3 -3
rag_routerv2.py CHANGED
@@ -81,9 +81,6 @@ async def create_embedding_table(
81
  with open(file_path, "wb") as buffer:
82
  shutil.copyfileobj(file.file, buffer)
83
 
84
-
85
- except Exception as e:
86
- raise HTTPException(status_code=500, detail=f"Failed to update tables file: {str(e)}")
87
  try:
88
  # Setup LanceDB vector store
89
  vector_store = LanceDBVectorStore(
@@ -125,6 +122,9 @@ async def create_embedding_table(
125
  with open(tables_file_path, 'w') as f:
126
  json.dump(tables, f)
127
 
 
 
 
128
  return CreateTableResponse(
129
  table_id=table_id,
130
  message="Table created and documents indexed successfully",
 
81
  with open(file_path, "wb") as buffer:
82
  shutil.copyfileobj(file.file, buffer)
83
 
 
 
 
84
  try:
85
  # Setup LanceDB vector store
86
  vector_store = LanceDBVectorStore(
 
122
  with open(tables_file_path, 'w') as f:
123
  json.dump(tables, f)
124
 
125
+ except Exception as e:
126
+ raise HTTPException(status_code=500, detail=f"Failed to update tables file: {str(e)}")
127
+
128
  return CreateTableResponse(
129
  table_id=table_id,
130
  message="Table created and documents indexed successfully",