Update app.py
Browse files
app.py
CHANGED
|
@@ -71,6 +71,7 @@ class QueryRequest(BaseModel):
|
|
| 71 |
|
| 72 |
@app.post("/setup/")
|
| 73 |
async def setup(request: SetupRequest):
|
|
|
|
| 74 |
state['url'] = request.url
|
| 75 |
state['collection_name'] = request.collection_name
|
| 76 |
|
|
@@ -114,6 +115,7 @@ async def query(request: QueryRequest):
|
|
| 114 |
return {"response": response.response}
|
| 115 |
|
| 116 |
@app.get("/chat-history/")
|
|
|
|
| 117 |
async def get_chat_history():
|
| 118 |
return {"chat_history": state['chat_history']}
|
| 119 |
|
|
|
|
| 71 |
|
| 72 |
@app.post("/setup/")
|
| 73 |
async def setup(request: SetupRequest):
|
| 74 |
+
|
| 75 |
state['url'] = request.url
|
| 76 |
state['collection_name'] = request.collection_name
|
| 77 |
|
|
|
|
| 115 |
return {"response": response.response}
|
| 116 |
|
| 117 |
@app.get("/chat-history/")
|
| 118 |
+
app.add_middleware(HTTPSRedirectMiddleware)
|
| 119 |
async def get_chat_history():
|
| 120 |
return {"chat_history": state['chat_history']}
|
| 121 |
|