Future-House / paper-qa

High accuracy RAG for answering questions from scientific documents with citations
Apache License 2.0
6.44k stars 617 forks source link

Resolving `evidence_detailed_citations` and `Answer` deprecations #682

Closed jamesbraza closed 1 week ago

jamesbraza commented 1 week ago

Seen in CI logs (link):

tests/test_configs.py: 2 warnings
tests/test_paperqa.py: 26 warnings
tests/test_cli.py: 10 warnings
tests/test_agents.py: 2 warnings
  /home/runner/work/paper-qa/paper-qa/.venv/lib/python3.11/site-packages/pydantic/main.py:212: DeprecationWarning: The 'evidence_detailed_citations' field is deprecated and will be removed in version 6. Adjust 'PromptSettings.context_inner' to remove detailed citations.
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)

tests/test_paperqa.py::test_answer_rename
  /home/runner/work/paper-qa/paper-qa/tests/test_paperqa.py:1136: DeprecationWarning: The 'Answer' class is deprecated and will be removed in future versions. Use 'PQASession' instead.
    answer = Answer(question="")

This PR: