-
Notifications
You must be signed in to change notification settings - Fork 617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#342] RAG - fix PDF format in vector database #551
base: main
Are you sure you want to change the base?
Conversation
@pytest.mark.asyncio | ||
async def test_downloads_pdf_and_returns_content(self, httpx_mock: HTTPXMock): | ||
url = "https://example.com/dummy.pdf" | ||
httpx_mock.add_response(url=url, content=read_file(DUMMY_PDF_PATH)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you guys think about mocking httpx here. Other options are:
- Download from a third party url: https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf
- Host it somewhere that we control (maybe this repo?)
Lmk what your preferences are here
return data_url | ||
|
||
|
||
# Requires pytest-httpx - pip install pytest-httpx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anywhere I can define these deps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
43119ce
to
de97100
Compare
de97100
to
da035d6
Compare
What does this PR do?
Addresses issue (#342)
Test Plan
Ran these unit tests:
Tested manually via this script to initialize and this script to query
Should output valid text chunks
Before submitting
Pull Request section?