Skip to content

Commit db3e07d

Browse files
committed
fix readmet
1 parent 7b2cddb commit db3e07d

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

fact_checker_cli/README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
Fact Checker CLI
1+
# Fact Checker CLI
22

3-
A command-line tool that identifies false or misleading claims in articles or statements using Perplexitys Sonar API for web research.
3+
A command-line tool that identifies false or misleading claims in articles or statements using Perplexity's Sonar API for web research.
44

5-
Features
6-
• Analyze claims or entire articles for factual accuracy
7-
• Identify false, misleading, or unverifiable claims
8-
• Provide explanations and corrections for inaccurate information
9-
• Output results in human-readable format or structured JSON
10-
• Cite reliable sources for fact-checking assessments
11-
• Leverages Perplexity’s structured outputs for reliable JSON parsing (for Tier 3+ users)
5+
## Features
126

13-
Installation
14-
1. Install required dependencies:
7+
- Analyze claims or entire articles for factual accuracy
8+
- Identify false, misleading, or unverifiable claims
9+
- Provide explanations and corrections for inaccurate information
10+
- Output results in human-readable format or structured JSON
11+
- Cite reliable sources for fact-checking assessments
12+
- Leverages Perplexity's structured outputs for reliable JSON parsing (for Tier 3+ users)
1513

16-
pip install requests pydantic
14+
## Installation
1715

16+
1. Install required dependencies:
17+
18+
```bash
19+
pip install requests pydantic
1820

1921
2. Make the script executable:
2022

@@ -25,8 +27,10 @@ chmod +x fact_checker.py
2527
API Key Setup
2628

2729
The tool requires a Perplexity API key to function. You can provide it in one of these ways:
28-
1. As a command-line argument: --api-key YOUR_API_KEY
29-
2. As an environment variable: export PPLX_API_KEY=YOUR_API_KEY
30+
1. As a command-line argument:
31+
--api-key YOUR_API_KEY
32+
2. As an environment variable:
33+
export PPLX_API_KEY=YOUR_API_KEY
3034
3. In a file named pplx_api_key or .pplx_api_key in the same directory as the script:
3135

3236
# Create a file to store your API key
@@ -42,7 +46,6 @@ Quick Start
4246

4347
Here’s a command you can copy and run immediately after setup:
4448

45-
# Make sure your API key is set up as described above, then run:
4649
./fact_checker.py -t "The Earth is flat and NASA is hiding the truth."
4750

4851
This will analyze the claim, research it using Perplexity’s Sonar API, and return a detailed fact check with ratings, explanations, and sources.
@@ -73,7 +76,7 @@ Use a Custom Prompt File
7376

7477
Enable Structured Outputs (for Tier 3+ Users)
7578

76-
Structured output is disabled by default. If you want to enable structured outputs (for reliable JSON parsing), pass the --structured-output flag:
79+
Structured output is disabled by default. To enable structured outputs (for reliable JSON parsing), pass the --structured-output flag:
7780

7881
./fact_checker.py --text "Vaccines cause autism." --structured-output
7982

@@ -120,6 +123,3 @@ Limitations
120123
• Like all language models, the underlying AI may have limitations in certain specialized domains
121124
• The structured outputs feature requires a Tier 3 or higher Perplexity API account
122125
• The tool does not replace professional fact-checking services for highly sensitive or complex content
123-
124-
125-

0 commit comments

Comments
 (0)