Update app.py
Browse files
app.py
CHANGED
|
@@ -24,7 +24,6 @@ async def send_chat_message(LLM_URL, LLM_API, category, file_id):
|
|
| 24 |
payload = {
|
| 25 |
"inputs": {},
|
| 26 |
"query": category,
|
| 27 |
-
"response_mode": "blocking", # ⬅️ 改這裡
|
| 28 |
"conversation_id": "",
|
| 29 |
"user": USER_ID,
|
| 30 |
"files": [
|
|
@@ -57,9 +56,6 @@ async def send_chat_message(LLM_URL, LLM_API, category, file_id):
|
|
| 57 |
except Exception as e:
|
| 58 |
return f"Error: Unexpected exception - {e}"
|
| 59 |
|
| 60 |
-
print("LLM_API:", LLM_API)
|
| 61 |
-
print("Headers:", {"Authorization": f"Bearer {LLM_API}"})
|
| 62 |
-
|
| 63 |
async def upload_file(LLM_URL, LLM_API, file_path, user_id):
|
| 64 |
if not os.path.exists(file_path):
|
| 65 |
return f"Error: File {file_path} not found"
|
|
|
|
| 24 |
payload = {
|
| 25 |
"inputs": {},
|
| 26 |
"query": category,
|
|
|
|
| 27 |
"conversation_id": "",
|
| 28 |
"user": USER_ID,
|
| 29 |
"files": [
|
|
|
|
| 56 |
except Exception as e:
|
| 57 |
return f"Error: Unexpected exception - {e}"
|
| 58 |
|
|
|
|
|
|
|
|
|
|
| 59 |
async def upload_file(LLM_URL, LLM_API, file_path, user_id):
|
| 60 |
if not os.path.exists(file_path):
|
| 61 |
return f"Error: File {file_path} not found"
|