Modified from the source code of nice work APE
first, set the openai key in detector_test.py
then, run the test script python detector_test.py
deterimine whether the text is generated by chatGPT based on the threshold of perplexity you chose.
- Prompt-based Perplexity for specific task.
- Word-Level Perplexity, now for the token level.