Spaces:
Sleeping
Sleeping
final try 67
Browse files- app/api.py +1 -1
- app/frontend/templates/pages/chat.html +1 -1
app/api.py
CHANGED
|
@@ -187,7 +187,7 @@ def root(request: Request):
|
|
| 187 |
|
| 188 |
|
| 189 |
@api.post("/message_with_docs")
|
| 190 |
-
async def create_prompt(files: list[UploadFile] = File(
|
| 191 |
docs = []
|
| 192 |
rag = initialize_rag()
|
| 193 |
print(444444444444444444444444444444444444444444444)
|
|
|
|
| 187 |
|
| 188 |
|
| 189 |
@api.post("/message_with_docs")
|
| 190 |
+
async def create_prompt(request: Request, files: list[UploadFile] = File(None), prompt: str = Form(...)):
|
| 191 |
docs = []
|
| 192 |
rag = initialize_rag()
|
| 193 |
print(444444444444444444444444444444444444444444444)
|
app/frontend/templates/pages/chat.html
CHANGED
|
@@ -139,7 +139,7 @@
|
|
| 139 |
formData.append('prompt', query); // Must use 'prompt' as the key
|
| 140 |
|
| 141 |
// Headers will be set automatically by the browser
|
| 142 |
-
const response = await fetch('/message_with_docs
|
| 143 |
method: 'POST',
|
| 144 |
body: formData
|
| 145 |
});
|
|
|
|
| 139 |
formData.append('prompt', query); // Must use 'prompt' as the key
|
| 140 |
|
| 141 |
// Headers will be set automatically by the browser
|
| 142 |
+
const response = await fetch('/message_with_docs', {
|
| 143 |
method: 'POST',
|
| 144 |
body: formData
|
| 145 |
});
|