Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -73,16 +73,16 @@ async def addPDFData(vectorstorename: str, pdf: UploadFile = File(...)):
|
|
| 73 |
|
| 74 |
@app.post("/addText")
|
| 75 |
async def addText(vectorstorename: str, text: str):
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
output
|
| 79 |
-
|
| 80 |
-
}
|
| 81 |
-
except Exception as e:
|
| 82 |
-
output = {
|
| 83 |
-
"error": e
|
| 84 |
-
}
|
| 85 |
return output
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
|
| 87 |
|
| 88 |
@app.get("/answerQuery")
|
|
|
|
| 73 |
|
| 74 |
@app.post("/addText")
|
| 75 |
async def addText(vectorstorename: str, text: str):
|
| 76 |
+
addDocuments(text = text, storename = vectorstorename)
|
| 77 |
+
output = {
|
| 78 |
+
"output": "SUCCESS"
|
| 79 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
return output
|
| 81 |
+
# except Exception as e:
|
| 82 |
+
# output = {
|
| 83 |
+
# "error": e
|
| 84 |
+
# }
|
| 85 |
+
# return output
|
| 86 |
|
| 87 |
|
| 88 |
@app.get("/answerQuery")
|