优化中间输出频率/plan_sop重构/autofill batch示例/README便携版链接

This commit is contained in:
Liang Jiaqing
2026-03-04 17:14:13 +08:00
parent 313f8a28f0
commit ed75d103f5
6 changed files with 34 additions and 33 deletions

View File

@@ -137,7 +137,7 @@ if __name__ == '__main__':
while True:
dq = agent.put_task(raw, source='task')
while 'done' not in (item := dq.get(timeout=120)):
if 'next' in item and random.random() < 0.05: # 1/20的概率写一次中间结果
if 'next' in item and random.random() < 0.95: # 概率写一次中间结果
with open(f'{d}/output{nround}.txt', 'w', encoding='utf-8') as f: f.write(item.get('next', ''))
with open(f'{d}/output{nround}.txt', 'w', encoding='utf-8') as f: f.write(item['done'] + '\n[ROUND END]\n')
for _ in range(150): # 等reply.txt5分钟超时