openfactcheck.FactCheckerState#
- class openfactcheck.FactCheckerState(question=None, response=None)[source][source]#
A class to manage the state of a fact-checking system.
It holds a question and its corresponding response, and provides methods to set and get these attributes dynamically.
- Parameters:
question (str | None)
response (str | None)
- __init__(question=None, response=None)[source][source]#
Initialize the FactCheckerState object.
- Parameters:
question (Optional[str]) – The question to be fact-checked.
response (Optional[str]) – The response to the question.
- Return type:
None
Methods
__init__
([question, response])Initialize the FactCheckerState object.
get
(name)Get an attribute of the state object.
set
(name, value)Set an attribute of the state object.
to_dict
()Return a dictionary representation of the state object.