Closed yoni13 closed 3 months ago
Before:
After:
Just a reminder that I haven't bump the version number
This is a great addition. However, I think it would be best if it takes advantage of the OnlineAgent's ability to receive a custom website reader rather than making it a parameter on the OnlineAgent.
Basically, the Selenium website reader you wrote should be a stand alone website reader in core.py that the user can import and use with the OnlineAgent.
Example use case with this new approach:
from llm_axe import selenium_reader
agent = OnlineAgent(llm, custom_site_reader=selenium_reader)
Let me know what your thoughts are. Thanks again!
Hello, I agree that making it a built-in reader function is a better option.
However, my original thoughts were only use selenium when JavaScript website is detected, if I made a custom selenium_reader
and uses it every time, we will get significant longer response time.
Or maybe I have to make two functions,selenium_reader
and selenium_and_soap_reader
?
Let me know what you think, thanks!
Oh okay. I see what you are saying.
In that case, I think your suggestion of making two functions seems like the best approach. It gives more options to the user which is always great.
Maybe we can call the second one selenium_hybrid_reader
?
Oh okay. I see what you are saying.
In that case, I think your suggestion of making two functions seems like the best approach. It gives more options to the user which is always great.
Maybe we can call the second one
selenium_hybrid_reader
?
That's a better name obviously, Thanks👍
Adds built-in Selenium support for Javascript website scraping.
No more "The website encountered an error and could not provide the requested data.", issue anymore while the bot is crawling sites like Quora.