Closed evangriffiths closed 7 months ago
Usage:
import sys sys.path.append("/Users/evan/dev/OpenFactVerification") from dotenv import load_dotenv from factcheck import FactCheck load_dotenv(dotenv_path="/Users/evan/dev/OpenFactVerification/.env") results = FactCheck().check_response("The sky is green") print(results["token_count"])
Gives
{'num_raw_tokens': 4, 'num_checkworthy_tokens': 5, 'total_prompt_tokens': 1748, 'total_completion_tokens': 231}
Hacky PR to check token counts. Not intending to merge, so closing
Usage:
Gives