|
|
@@ -103,7 +103,8 @@ async def reflect_check(context: str, labels: list):
|
|
|
"messages": [{"role":"system","content": prompt}]
|
|
|
},context = {})
|
|
|
result = response["structured_response"]
|
|
|
- result = [r.dict() for r in result.labels]
|
|
|
+ # 只保留passr为true的标签,并将结果转换为字典列表格式
|
|
|
+ result = [r.dict() for r in result.labels if r.passr]
|
|
|
result = json.dumps(result, ensure_ascii=False)
|
|
|
l2 = datetime.now().isoformat()
|
|
|
logger.info(f"Reflection check completed with uuid {uid}. timestamp: {l2}, consuming {(datetime.fromisoformat(l2) - datetime.fromisoformat(l1)).total_seconds()} seconds.")
|