StreamingOmniDatasets / scripts /tools /validate_tool_grounding.py
skyzhou06's picture
Add files using upload-large-folder tool
f63a61e verified
Raw History Blame Contribute Delete
250 Bytes
#!/usr/bin/env python3
import json,sys
def grounded(final,result):
vals=result.values() if isinstance(result,dict) else [result]
return any(str(v).lower() in final.lower() for v in vals if len(str(v))>=2)
print('tool grounding helper ready')