fix: 执行器输出LLM处理结果给Dad
- gateway API返回结果打印到Dad可见的输出 - 每个TODO在Dad面前出现1次(直接修复)或2次(创建+结果) - LLM也搞不定的会在结果里说清楚
This commit is contained in:
@@ -83,11 +83,12 @@ def main():
|
|||||||
result = reply["choices"][0]["message"]["content"][:500]
|
result = reply["choices"][0]["message"]["content"][:500]
|
||||||
conn.execute("UPDATE todos SET status='completed', note=? WHERE id=?",
|
conn.execute("UPDATE todos SET status='completed', note=? WHERE id=?",
|
||||||
(f"知微已处理: {result[:200]}", tid))
|
(f"知微已处理: {result[:200]}", tid))
|
||||||
print(f" 🔶 {title}: 已处理")
|
print(f" 🔶 {title}")
|
||||||
|
print(f" {result[:300]}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
conn.execute("UPDATE todos SET status='pending', note=? WHERE id=?",
|
conn.execute("UPDATE todos SET status='pending', note=? WHERE id=?",
|
||||||
(f"调用知微失败: {str(e)[:100]},下次再试", tid))
|
(f"调用知微失败: {str(e)[:100]},下次再试", tid))
|
||||||
print(f" ⚠️ {title}: 调用失败,下次再试")
|
print(f" ⚠️ {title}: gateway API调用失败,下次再试")
|
||||||
|
|
||||||
conn.commit()
|
conn.commit()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user