update ai insight pake qwenn
CI / lint-and-test (push) Canceled after 0s

This commit is contained in:
Alberto-Audrix committed 2026-07-31 08:52:30 +07:00
1 parent 208e11e4f8
commit a8b49374f1
44 files changed
+119956 -552

No files matched your search

+7 -3
View File
@@ -88,7 +88,7 @@ router.delete('/cleanup', async (req, res) => {
});
// POST /api/ai-insights/dashboard
// Body: { cycleId, kandangId, contextPack, version, forceRefresh }
// Body: { cycleId, kandangId, contextPack, version, forceRefresh, reportType, reportPeriod }
router.post('/dashboard', async (req, res) => {
try {
const {
@@ -97,6 +97,8 @@ router.post('/dashboard', async (req, res) => {
contextPack,
version = INSIGHT_VERSION,
forceRefresh = false,
reportType = 'daily',
reportPeriod = null,
} = req.body;
if (!cycleId || !contextPack) {
@@ -112,6 +114,8 @@ router.post('/dashboard', async (req, res) => {
contextPack,
version,
forceRefresh: Boolean(forceRefresh),
reportType,
reportPeriod,
});
res.json({
@@ -195,7 +199,7 @@ ${chunksText}
const lmStudioBaseUrl = process.env.LM_STUDIO_BASE_URL || process.env.OLLAMA_BASE_URL ||
(process.env.DOCKER_ENV === 'true' ? 'http://host.docker.internal:11434' : 'http://127.0.0.1:11434');
isOllama = lmStudioBaseUrl.includes('11434') || lmStudioBaseUrl.includes('llm');
let modelName = process.env.LLM_MODEL_NAME || 'deepseek-r1:8b';
let modelName = process.env.LLM_MODEL_NAME || 'qwen2.5:7b';
// Only auto-detect if LLM_MODEL_NAME is not explicitly configured
if (!process.env.LLM_MODEL_NAME) {
@@ -243,7 +247,7 @@ ${chunksText}
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload),
signal: AbortSignal.timeout(540000)
signal: AbortSignal.timeout(1800000)
});
if (response.ok) {