Spaces:
No application file
No application file
fix
Browse files- app/app_routes.py +4 -2
- app/static/js/app-device.js +3 -3
app/app_routes.py
CHANGED
@@ -514,8 +514,10 @@ def register_routes(app, login_required, llm_interface, retriever, stt_client, D
|
|
514 |
@login_required
|
515 |
def list_documents():
|
516 |
"""์ง์๋ฒ ์ด์ค ๋ฌธ์ ๋ชฉ๋ก API"""
|
517 |
-
|
518 |
-
|
|
|
|
|
519 |
|
520 |
try:
|
521 |
sources = {}
|
|
|
514 |
@login_required
|
515 |
def list_documents():
|
516 |
"""์ง์๋ฒ ์ด์ค ๋ฌธ์ ๋ชฉ๋ก API"""
|
517 |
+
# app_ready ๊ฒ์ฌ ์ ๊ฑฐ - ๋ฌธ์ ๋ชฉ๋ก ๋ถ๋ฌ์ค๊ธฐ๋ ํญ์ ํ์ฉ
|
518 |
+
if base_retriever is None:
|
519 |
+
logger.warning("๋ฌธ์ API ์์ฒญ์ base_retriever๊ฐ None์")
|
520 |
+
return jsonify({"documents": [], "total_documents": 0, "total_chunks": 0})
|
521 |
|
522 |
try:
|
523 |
sources = {}
|
app/static/js/app-device.js
CHANGED
@@ -59,16 +59,16 @@ function initDeviceServerSettings() {
|
|
59 |
// ์ค์ ์์ - ์๋ ์์ฑ (ํ์ฌ ํธ์คํธ + ํฌํธ 5050)
|
60 |
const currentHost = window.location.hostname;
|
61 |
const protocol = window.location.protocol;
|
62 |
-
DEVICE_SERVER_URL = `${protocol}//${currentHost}:
|
63 |
console.log(`์ฅ์น ์๋ฒ URL ์๋ ์ค์ : ${DEVICE_SERVER_URL}`);
|
64 |
}
|
65 |
})
|
66 |
.catch(error => {
|
67 |
console.error('์ฅ์น ์๋ฒ ์ค์ ์ด๊ธฐํ ์ค๋ฅ:', error);
|
68 |
-
// ๊ธฐ๋ณธ๊ฐ์ผ๋ก ์ค์ (ํ์ฌ ํธ์คํธ + ํฌํธ
|
69 |
const currentHost = window.location.hostname;
|
70 |
const protocol = window.location.protocol;
|
71 |
-
DEVICE_SERVER_URL = `${protocol}//${currentHost}:
|
72 |
console.log(`์ฅ์น ์๋ฒ URL ๊ธฐ๋ณธ๊ฐ ์ค์ : ${DEVICE_SERVER_URL}`);
|
73 |
});
|
74 |
}
|
|
|
59 |
// ์ค์ ์์ - ์๋ ์์ฑ (ํ์ฌ ํธ์คํธ + ํฌํธ 5050)
|
60 |
const currentHost = window.location.hostname;
|
61 |
const protocol = window.location.protocol;
|
62 |
+
DEVICE_SERVER_URL = `${protocol}//${currentHost}:5051`;
|
63 |
console.log(`์ฅ์น ์๋ฒ URL ์๋ ์ค์ : ${DEVICE_SERVER_URL}`);
|
64 |
}
|
65 |
})
|
66 |
.catch(error => {
|
67 |
console.error('์ฅ์น ์๋ฒ ์ค์ ์ด๊ธฐํ ์ค๋ฅ:', error);
|
68 |
+
// ๊ธฐ๋ณธ๊ฐ์ผ๋ก ์ค์ (ํ์ฌ ํธ์คํธ + ํฌํธ 5051)
|
69 |
const currentHost = window.location.hostname;
|
70 |
const protocol = window.location.protocol;
|
71 |
+
DEVICE_SERVER_URL = `${protocol}//${currentHost}:5051`;
|
72 |
console.log(`์ฅ์น ์๋ฒ URL ๊ธฐ๋ณธ๊ฐ ์ค์ : ${DEVICE_SERVER_URL}`);
|
73 |
});
|
74 |
}
|