lavague-ai / LaVague

Large Action Model framework to develop AI Web Agents
https://docs.lavague.ai/en/latest/
Apache License 2.0
5.5k stars 506 forks source link

extract_xpaths_from_html not reflected in most recent lavague-core==0.2.35 #599

Closed rtreddick closed 2 months ago

rtreddick commented 2 months ago

@lyie28, I'm following the Navigation engine docs here: https://docs.lavague.ai/en/latest/docs/module-guides/navigation-engine/

context = "\n".join(nodes)
action = nav_engine.get_action_from_context(context, instruction)
display(Code(action, language="python"))

When I run this code in my notebook, I get "KeyError: 'authorized_xpaths'". I'm running lavague-core==0.2.35 and lavague 1.1.19.

I see some changes were made last week to NavigationEngine: https://github.com/lavague-ai/LaVague/blame/b343013e67e965a579c4c415083a5e771dbf6d00/lavague-core/lavague/core/navigation.py#L177

It seems like I'm in a state where the NAVIGATION_ENGINE_PROMPT_TEMPLATE has been updated to include authorized_xpaths, but the get_action_from_context method changes are not reflected in most recent version of lavague-core.

lyie28 commented 2 months ago

Hi @rtreddick - thanks for this. I checked and we don't have the issue when installing from local but I see the issue if I download from the pypi package so I will find the package that needs updated and publish the latest version

rtreddick commented 2 months ago

That’s what I was thinking. Just the package on PyPi wasn’t up to date.

On Fri, Sep 6, 2024 at 8:50 AM Laura Yie @.***> wrote:

Hi @rtreddick https://github.com/rtreddick - thanks for this. I checked and we don't have the issue when installing from local but I see the issue if I download from the pypi package so I will find the package that needs updated and publish the latest version

— Reply to this email directly, view it on GitHub https://github.com/lavague-ai/LaVague/issues/599#issuecomment-2333982226, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMLXAKWP36F7WMURUD5BG3TZVGQKPAVCNFSM6AAAAABNW3RQDKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZTHE4DEMRSGY . You are receiving this because you were mentioned.Message ID: @.***>

lyie28 commented 2 months ago

Should work now if you run: pip install --upgrade lavague-drivers-selenium