' +
'
⏳
' +
'
本地模型推理中,已经等待 10 秒
' +
'
qwen2.5:14b 在本地处理中,复杂问题可能需要一些时间。您可以:
' +
'
' +
'📚 切换到本地数据库(秒回) ' +
'🔄 重新提问 ' +
'
';
}
}, 10000);
var controller = new AbortController();
var timeoutId = setTimeout(function(){ controller.abort(); }, 60000);
fetch(OLLAMA_BASE + '/chat', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'qwen2.5:14b',
messages: [
{role: 'system', content: '你是满意解研究所的AI助手。基于满意解理论、四层契晋(L1-L4)、4主维度(有限理性/满意化策略/偏序评价/程序理性)回答问题。回答简洁专业,客户面向。'},
{role: 'user', content: question}
],
stream: false,
options: {temperature: 0.7, num_predict: 512}
}),
signal: controller.signal
})
.then(function(r){ return r.json(); })
.then(function(data){
aborted = true;
clearTimeout(timerId);
clearTimeout(timeoutId);
var elapsed = Math.round((Date.now() - startTime) / 1000);
if (data.message && data.message.content) {
ansEl.innerHTML = data.message.content +
'' +
'
⏳
' +
'
仍在思考中,已经等待 ' + secs + ' 秒
' +
'
云端模型 (GLM-4-Flash) 响应可能需要一些时间,您可以:
' +
'
' +
'📚 切换到本地数据库(秒回) ' +
'🔄 重新提问 ' +
'
';
}
// L3: 云端GLM-4-Flash(含超时提醒)
function queryCloud(question, ansEl, btn) {
var startTime = Date.now();
var aborted = false;
// 15秒后显示提醒
var timerId = setTimeout(function(){
if (!aborted) {
showTimeoutHint(ansEl, 'cloud', 15);
}
}, 15000);
// AbortController for timeout
var controller = new AbortController();
var timeoutId = setTimeout(function(){ controller.abort(); }, 45000);
fetch(API_BASE + '/cloud', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({question: question}),
signal: controller.signal
})
.then(function(r){ return r.json(); })
.then(function(data){
aborted = true;
clearTimeout(timerId);
clearTimeout(timeoutId);
var elapsed = Math.round((Date.now() - startTime) / 1000);
if (data.ok && data.answer) {
ansEl.innerHTML = data.answer +
'
你的决策盲区在哪里?哪些维度需要重点提升?
每个人的决策能力都有盲区——就像飞行员有盲区一样。这个工具帮你发现那些你看不到的决策弱点。发现盲区不是为了批评你,而是为了帮你进步。
Simon (1990, p.7): Human rational behavior is shaped by a scissors whose two blades are the structure of task environments and the computational capabilities of the actor.