Skip to content

Commit

Permalink
fix: small error
Browse files Browse the repository at this point in the history
  • Loading branch information
StromFLIX committed Mar 31, 2024
1 parent 5c54b81 commit 1b114d0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,19 @@
|Obama is actually born in Kenya, the country of his father. |ResultType.REJECTED|https://www.snopes.com/fact-check/birthing-pains/|World News Daily Report\'s disclaimer page states that: World News Daily Report is a news and political satire web publication, which may or may not use real names, often in semi-real or mostly fictitious ways. All news articles contained within worldnewsdailyreport.com are fiction, and presumably fake news. |
|Obama is not \'a natural-born citizen of the U.S.\' and is therefore not fit for office.|ResultType.VERIFIED|https://www.snopes.com/fact-check/native-son/ |The minimum qualifications for the presidency of the United States specified in Article II of the Constitution are few and seemingly straightforward: In order to be President, a person must be a natural-born citizen of the United States, must be at least thirty-five years old, and must have been a resident of the United States for fourteen years.|

```py
from factuality.runner.factuality import Factuality
from factuality.utils.options import Options

factuality = Factuality(
options=Options(
oai_api_key="<api_key_here>",
bing_search_v7_endpoint="https://api.bing.microsoft.com/",
bing_search_v7_subscription_key="<subscription_key_here>"
)
)

conclusion, _, _ = factuality.check("Neil armstrong land on the moon.")

print(conclusion.description, conclusion.score)
```
2 changes: 1 addition & 1 deletion factuality/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def main():
"--same-site-allowed",
type=str,
default=os.getenv(
"SAME_SITE_ALLOWED", Defaults.SAME_SITE_ALLOWED.value
"SAME_SITE_ALLOWED", f"{Defaults.SAME_SITE_ALLOWED.value}"
),
help="If the same site is allowed to be used multiple times for the same claim. Default is True.",
)
Expand Down
4 changes: 2 additions & 2 deletions factuality/utils/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Options:
def __init__(
self,
oai_api_key,
bing_search_v7_subscription_key,
bing_search_v7_subscription_key = None,
bing_search_v7_endpoint = Defaults.BING_SEARCH_V7_ENDPOINT.value,
openai_model_extract = Defaults.OPENAI_MODEL_EXTRACT.value,
openai_model_factcheck = Defaults.OPENAI_MODEL_FACTCHECK.value,
Expand All @@ -19,7 +19,7 @@ def __init__(
allowlist = Defaults.ALLOWLIST.value,
blocklist = Defaults.BLOCKLIST.value,
validation_checks_per_claim = Defaults.VALIDATION_CHECKS_PER_CLAIM.value,
same_site_allowed = Defaults.SAME_SITE_ALLOWED.value,
same_site_allowed = f"{Defaults.SAME_SITE_ALLOWED.value}",
google_search_api_key = None,
google_search_cx = None,
):
Expand Down

0 comments on commit 1b114d0

Please sign in to comment.