Skip to content
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

No difference between Docs.query and Docs.aquery in request execution time. #631

Open
Snikch63200 opened this issue Oct 23, 2024 · 1 comment
Labels
question Further information is requested

Comments

@Snikch63200
Copy link

Hello,

I tried to execute the same query with sync and async methods :

See here : https://github.com/Future-House/paper-qa?tab=readme-ov-file#adding-documents-manually

But both methods takes the same amount of time...

Is it something to set to allow async processing ?

Best regards.

PS : I saw my LLM 'stream' parameter is set to 'False'.

@dosu.

Copy link

dosubot bot commented Oct 23, 2024

The synchronous method Docs.query and the asynchronous method Docs.aquery in the PaperQA2 framework are designed to perform the same operations, but in different execution contexts. The synchronous Docs.query internally calls the asynchronous Docs.aquery using get_loop().run_until_complete(), which can result in similar execution times if the environment does not fully leverage asynchronous capabilities [1].

To ensure effective asynchronous processing, make sure your environment supports async operations natively. For example, using an environment like Jupyter notebooks can help. Additionally, the 'stream' parameter being set to 'False' might affect how results are returned, which could impact the perceived performance. Unfortunately, specific details about the 'stream' parameter's impact on performance are not available in the current documentation [1].

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added the question Further information is requested label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant