简体中文
@app.tool(output="ans_ls->ans_ls") def check_dont_know(ans_ls: List[str]) -> Dict[str, List[Dict[str, str]]]: ans_ls = [ { "data": ans, "state": "retry" if "i don't know" in ans.lower() else "finish" } for ans in ans_ls ] return {"ans_ls": ans_ls}
"retry"
"finish"
branch:
router:
pipeline: - generation.generate - loop: times: 3 steps: - branch: router: - router.check_dont_know branches: retry: - generation.generate finish: [] - evaluation.evaluate
此页面对您有帮助吗?