update
This commit is contained in:
parent
bc30973ae5
commit
75e28c71a2
1 changed files with 3 additions and 3 deletions
|
|
@ -157,7 +157,7 @@ async def process_fact_check(query: str) -> Union[FactCheckResponse, UnverifiedF
|
||||||
sources=sources,
|
sources=sources,
|
||||||
evidence=evidence,
|
evidence=evidence,
|
||||||
explanation=explanation,
|
explanation=explanation,
|
||||||
additional_context=f"Fact checked using PlanPost AI on {datetime.now().strftime('%Y-%m-%d')}"
|
additional_context=f"Fact checked using Fruad Guard on {datetime.now().strftime('%Y-%m-%d')}"
|
||||||
)
|
)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
@ -168,7 +168,7 @@ async def process_fact_check(query: str) -> Union[FactCheckResponse, UnverifiedF
|
||||||
confidence=ConfidenceEnum.LOW,
|
confidence=ConfidenceEnum.LOW,
|
||||||
sources=[],
|
sources=[],
|
||||||
evidence='No fact check results found.',
|
evidence='No fact check results found.',
|
||||||
explanation="Failed to contact Perplexity AI or parse its response.",
|
explanation="No Fact check found for this",
|
||||||
additional_context="Possible API issue or malformed response."
|
additional_context="Possible API issue or malformed response."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -197,7 +197,7 @@ def extract_fact_check_info(text_response: str) -> Dict[str, Any]:
|
||||||
"""Extract fact-checking information from a text response when JSON parsing fails.
|
"""Extract fact-checking information from a text response when JSON parsing fails.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
text_response: The text response from Perplexity AI
|
text_response: The text response from Fruad Guard
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
A dictionary with fact-checking information extracted from the text
|
A dictionary with fact-checking information extracted from the text
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue