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

Extracting next engine consistently fails #622

Open
dlculver opened this issue Oct 30, 2024 · 4 comments
Open

Extracting next engine consistently fails #622

dlculver opened this issue Oct 30, 2024 · 4 comments

Comments

@dlculver
Copy link

dlculver commented Oct 30, 2024

When I run the WebAgent class to do a task, I consistently run into the following kind of error:

ValueError: No next engine found in the text: **Thoughts:**

* The current screenshot shows the Google homepage.
* The objective is to find the weather in Los Angeles.
* Since we are on the Google homepage, we can use the search bar to find the weather information.

**Next Engine:** Navigation Engine

**Instruction:** Type 'Los Angeles weather' in the search bar and press Enter.

Sometimes this issue is so persistent that even after several retries the error continues. I think this is because the extract_next_engine utility function expects to see things like 'Next engine' and the regular expression search is case sensitive. One option would be to ignore case when doing the regular expression search. I think this should be an easy fix and would also like to volunteer to fix it.

@DecentMakeover
Copy link

DecentMakeover commented Nov 5, 2024

hi , @dlculver facing the same issue , do you have a fix for this ?

@dlculver
Copy link
Author

dlculver commented Nov 5, 2024

@DecentMakeover The way I solved it for myself, at least locally, was to find the particular file in the pip installed version of lavague. To get the location of lavague you need to run
pip show lavague
and you should see where those files are located on your computer. Change your directory to the location you found, and then open up the file lavague-core/lavague/core/utilities/format_utilities.py or something on those lines (don't exactly remember). Next, find the function extract_next_engine, and then what I did was change the re.search on line 170 to include re.IGNORECASE. Save the file, and then it should be fine (at least it was for me).

@DecentMakeover
Copy link

@dlculver thank you , it worked . cheers .

@timreddick-8451
Copy link

timreddick-8451 commented Nov 7, 2024

@dlculver, I have the same issue. I will try your fix locally, but what do you think caused this issue to arise? I was working on a project, and didn't run lavague for several weeks. The version in my project is pinned, so not sure why this just popped up for the first time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants