run-llama / llama_index

LlamaIndex is a data framework for your LLM applications
https://docs.llamaindex.ai
MIT License
35.49k stars 5.01k forks source link

[Bug]: llama-index-readers-wordpress requires (but does not need) username and password #16071

Open jonpspri opened 1 day ago

jonpspri commented 1 day ago

Bug Description

The llama-index-readers-wordpress plugin currently requires username and password to instantiate the object. It does not, however, use those values anywhere in the object code, nor do some wordpress sites require login to be scraped. The two parameters should therefore be made optional to avoid breaking current code but allow for allocation of the object without specifying the values.

Version

HEAD

Steps to Reproduce

from llama_index.readers.wordpress import WordpressReader

loader = WordpressReader( url='https://www.example.com' )

Relevant Logs/Tracbacks

No response

jonpspri commented 1 day ago

I have a PR coming to resolve this.

dosubot[bot] commented 1 day ago

Hey there, @jonpspri! I'm here to help you out with any bugs, questions, or contributions you have. Let me know how I can assist you while you wait for a human maintainer.

The llama-index-readers-wordpress plugin requires the username and password parameters because it uses the Wordpress API, which typically requires authentication to access certain endpoints or data. These parameters are necessary for the API to verify the identity of the user making the request [1].

However, the current implementation does not show these parameters being used directly in the load_data or get_posts_page methods, suggesting that while they are required for initialization, their usage for authentication in API requests is not explicitly shown in the provided code snippet [2].

If you have a PR to make these parameters optional, it would be beneficial to ensure that the plugin can still function correctly for Wordpress sites that do not require authentication. This change could enhance usability without breaking existing code.

To continue talking to Dosu, mention @dosu.