MCPcopy Create free account
hub / github.com/GAIR-NLP/factool / fact_check_code

Function fact_check_code

plugin_config/main.py:42–47  ·  view source on GitHub ↗
(request_data: FactCheckRequest)

Source from the content-addressed store, hash-verified

40
41@app.post("/fact_check_code")
42async def fact_check_code(request_data: FactCheckRequest):
43 request_obj = FactCheckRequest(**request_data.dict())
44 fact_check_result = await factool_instance.run_for_plugin([{'prompt': request_obj.prompt, 'response': request_obj.response, 'category': 'code', 'entry_point': request_obj.entry_point}])
45 fact_check_id = len(fact_checks) + 1
46 fact_checks[fact_check_id] = fact_check_result
47 return JSONResponse(content={"fact_check_id": fact_check_id, "fact_check_result": fact_check_result})
48
49@app.post("/fact_check_math")
50async def fact_check_math(request_data: FactCheckRequest):

Callers

nothing calls this directly

Calls 2

FactCheckRequestClass · 0.85
run_for_pluginMethod · 0.80

Tested by

no test coverage detected