Skip to content

Commit

Permalink
quickfix: use answer_text instead of answer_generator from now on (#113)
Browse files Browse the repository at this point in the history
* quickfix: use answer_text instead of answer_generator from now on
  • Loading branch information
jerpint authored Jun 29, 2023
1 parent 332a722 commit 7240442
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion buster/busterbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def process_input(self, user_input: str, source: str = None) -> Completion:
error=False,
user_input=user_input,
matched_documents=pd.DataFrame(),
answer_generator=irrelevant_question_message,
answer_text=irrelevant_question_message,
answer_relevant=False,
question_relevant=False,
validator=self.validator,
Expand Down
2 changes: 1 addition & 1 deletion buster/completers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def get_completion(
# because we are proceeding with a completion, we assume the question is relevant.
completion = self.completion_class(
user_input=user_input,
answer_generator=self.no_documents_message,
answer_text=self.no_documents_message,
error=False,
matched_documents=matched_documents,
question_relevant=question_relevant,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_chatbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def complete(self):

def get_completion(self, user_input, matched_documents, validator, *arg, **kwarg) -> Completion:
return Completion(
answer_generator=self.expected_answer,
answer_text=self.expected_answer,
error=False,
user_input=user_input,
matched_documents=matched_documents,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_read_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_read_write_completion():
c = Completion(
user_input="What is the meaning of life?",
error=False,
answer_generator="This is my actual answer",
answer_text="This is my actual answer",
matched_documents=matched_documents,
validator=MockValidator(),
)
Expand Down

0 comments on commit 7240442

Please sign in to comment.