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

errors.pydantic #179

Open
xvoland opened this issue Jan 27, 2025 · 3 comments
Open

errors.pydantic #179

xvoland opened this issue Jan 27, 2025 · 3 comments

Comments

@xvoland
Copy link

xvoland commented Jan 27, 2025

INFO [agent] πŸš€ Starting task: go to google.com and type 'OpenAI' click search and give me the first url
INFO [src.agent.custom_agent]
πŸ“ Step 1
ERROR [agent] ❌ Result failed 1/5 times:
Invalid model output format. Please follow the correct schema.
Details: 1 validation error for CustomAgentOutput
current_state.future_plans
Input should be a valid string [type=string_type, input_value=["Go to Google and type 'OpenAI'"], input_type=list]
For further information visit https://errors.pydantic.dev/2.10/v/string_type
INFO [src.agent.custom_agent]
πŸ“ Step 1
ERROR [agent] ❌ Result failed 2/5 times:
Invalid model output format. Please follow the correct schema.
Details: 1 validation error for CustomAgentOutput
current_state.future_plans
Input should be a valid string [type=string_type, input_value=["Go to Google and type 'OpenAI'"], input_type=list]
For further information visit https://errors.pydantic.dev/2.10/v/string_type
INFO [src.agent.custom_agent]
πŸ“ Step 1
ERROR [agent] ❌ Result failed 3/5 times:
Invalid model output format. Please follow the correct schema.
Details: 2 validation errors for CustomAgentOutput
current_state.future_plans
Input should be a valid string [type=string_type, input_value=["Go to Google and type 'OpenAI' click search"], input_type=list]
For further information visit https://errors.pydantic.dev/2.10/v/string_type
action.0.done.text
Input should be a valid string [type=string_type, input_value={'type': 'string', 'input... 'input_type': ['list']}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.10/v/string_type
INFO [src.agent.custom_agent]
πŸ“ Step 1
ERROR [agent] ❌ Result failed 4/5 times:
Invalid model output format. Please follow the correct schema.
Details: 1 validation error for CustomAgentOutput
current_state.future_plans
Input should be a valid string [type=string_type, input_value=['Switch to a tab and navigate to google.com'], input_type=list]
For further information visit https://errors.pydantic.dev/2.10/v/string_type
INFO [src.agent.custom_agent]
πŸ“ Step 1
ERROR [agent] ❌ Result failed 5/5 times:
Invalid model output format. Please follow the correct schema.
Details: 1 validation error for CustomAgentOutput
current_state.future_plans
Input should be a valid string [type=string_type, input_value=["Search for 'OpenAI' on Google"], input_type=list]
For further information visit https://errors.pydantic.dev/2.10/v/string_type
ERROR [agent] ❌ Stopping due to 5 consecutive failures
INFO [src.agent.custom_agent] Created GIF at agent_history.gif

@omersanli17
Copy link

Same issue

@goodrich88
Copy link

Same issue as well.

@xvoland
Copy link
Author

xvoland commented Feb 4, 2025

After updating the code it started working but still has problems

INFO     [agent] πŸš€ Starting task: what stock price nvidia now?
INFO     [src.agent.custom_agent]
πŸ“ Step 1
INFO     [src.agent.custom_agent] 🀷 Eval: Unknown - The website is blank, it's unclear how to proceed with the task.
INFO     [src.agent.custom_agent] 🧠 New Memory:
INFO     [src.agent.custom_agent] ⏳ Task Progress:
1. Search Google in the current tab: {search_google: {query: "Nvidia stock price"}}
INFO     [src.agent.custom_agent] πŸ“‹ Future Plans:
2. Get search results from Google: Open Google search engine and find the current stock price of NVIDIA.
INFO     [src.agent.custom_agent] πŸ€” Thought: To start, I need to open a web browser and navigate to the search engine (Google). Then I will input the query "Nvidia stock price" and get the latest information.
INFO     [src.agent.custom_agent] 🎯 Summary: Open Google search engine, input the query for Nvidia's current stock price.
INFO     [src.agent.custom_agent] πŸ› οΈ  Action 1/3: {"go_to_url":{"url":"https://www.google.com"}}
INFO     [src.agent.custom_agent] πŸ› οΈ  Action 2/3: {"input_text":{"index":1,"text":"Nvidia stock price"}}
INFO     [src.agent.custom_agent] πŸ› οΈ  Action 3/3: {"send_keys":{"keys":"Enter"}}
INFO     [src.agent.custom_agent] 🧠 All Memory:

INFO     [controller] πŸ”—  Navigated to https://www.google.com
INFO     [controller] Something new appeared after action 1 / 3
INFO     [src.agent.custom_agent]
πŸ“ Step 2
ERROR    [agent] ❌ Result failed 1/5 times:
 src.agent.custom_views.CustomAgentOutput() argument after ** must be a mapping, not list
INFO     [src.agent.custom_agent]
πŸ“ Step 2
INFO     [src.agent.custom_agent] ❌ Eval: Failed - The task was to input the query "Nvidia stock price" but instead the search box was found and located.
INFO     [src.agent.custom_agent] 🧠 New Memory:
INFO     [src.agent.custom_agent] ⏳ Task Progress:
1. Input the query "Nvidia stock price" in the search box: {input_text: {index: 5, text: "Nvidia stock price"}},
2. Click on the magnifying glass to start searching: {click_element: {index: 1}},
3. Get search results from Google and find the current stock price of NVIDIA.
INFO     [src.agent.custom_agent] πŸ“‹ Future Plans:
4. Open first search result and find the current stock price of NVIDIA.
INFO     [src.agent.custom_agent] πŸ€” Thought: To proceed, I need to input the query, click on the magnifying glass, and get the latest information from the search results.
INFO     [src.agent.custom_agent] 🎯 Summary: Input the query for Nvidia's current stock price.
INFO     [src.agent.custom_agent] πŸ› οΈ  Action 1/1: {"input_text":{"index":5,"text":"Nvidia stock price"}}
INFO     [src.agent.custom_agent] 🧠 All Memory:

INFO     [controller] ⌨️  Input "Nvidia stock price" into index 5
INFO     [src.agent.custom_agent]
πŸ“ Step 3
INFO     [src.agent.custom_agent] βœ… Eval: Success - The text 'Nvidia stock price' was inputted into the search bar.
INFO     [src.agent.custom_agent] 🧠 New Memory: The current URL is https://www.google.com/ and the search bar is currently empty. The first result for "nvidia stock price" is available, showing various options such as 'stock price today', 'stock price chart', etc.
INFO     [src.agent.custom_agent] ⏳ Task Progress:
2. Get search results from Google: {click_element: {index: 10}}
INFO     [src.agent.custom_agent] πŸ“‹ Future Plans:
3. Open the first search result and find the current stock price of NVIDIA.
INFO     [src.agent.custom_agent] πŸ€” Thought: To proceed, I need to click on the 'nvidia stock price' option to open its details page.
INFO     [src.agent.custom_agent] 🎯 Summary: Click on the nvidia stock price result.
INFO     [src.agent.custom_agent] πŸ› οΈ  Action 1/1: {"click_element":{"index":10}}
INFO     [src.agent.custom_agent] 🧠 All Memory:
The current URL is https://www.google.com/ and the search bar is currently empty. The first result for "nvidia stock price" is available, showing various options such as 'stock price today', 'stock price chart', etc.

INFO     [controller] πŸ–±οΈ  Clicked button with index 10:
INFO     [src.agent.custom_agent]
πŸ“ Step 4
ERROR    [agent] ❌ Result failed 1/5 times:
 Invalid model output format. Please follow the correct schema.
Details: 1 validation error for CustomAgentOutput
action.0.scroll_down.amount
  Input should be a valid integer, unable to parse string as an integer [type=int_parsing, input_value='None', input_type=str]
    For further information visit https://errors.pydantic.dev/2.10/v/int_parsing
INFO     [src.agent.custom_agent]
πŸ“ Step 4
INFO     [src.agent.custom_agent] ❌ Eval: Failed - The task is to find the current stock price of NVIDIA, but the page contains various options and results, making it unclear which one is the correct information.
INFO     [src.agent.custom_agent] 🧠 New Memory: The search bar is empty and does not contain any relevant input for finding the current stock price. However, there are multiple results available on the page, including Market Summary and related news articles.
INFO     [src.agent.custom_agent] ⏳ Task Progress:
1. Input the query "Nvidia stock price" in the search box: {input_text: {index: 1, text: "Nvidia stock price"}},
2. Get relevant information from the search results: Open a specific result that provides the current stock price of NVIDIA.
INFO     [src.agent.custom_agent] πŸ“‹ Future Plans:
3. Open first search result and find the current stock price of NVIDIA in the result details:
INFO     [src.agent.custom_agent] πŸ€” Thought: To proceed, I need to input the query, get relevant search results, and open the first result that provides the current stock price information.
INFO     [src.agent.custom_agent] 🎯 Summary: Input the query for Nvidia's current stock price.
INFO     [src.agent.custom_agent] πŸ› οΈ  Action 1/1: {"input_text":{"index":1,"text":"Nvidia stock price"}}
INFO     [src.agent.custom_agent] 🧠 All Memory:
The current URL is https://www.google.com/ and the search bar is currently empty. The first result for "nvidia stock price" is available, showing various options such as 'stock price today', 'stock price chart', etc.
The search bar is empty and does not contain any relevant input for finding the current stock price. However, there are multiple results available on the page, including Market Summary and related news articles.

INFO     [controller] ⌨️  Input "Nvidia stock price" into index 1
INFO     [src.agent.custom_agent]
πŸ“ Step 5
INFO     [src.agent.custom_agent] 🀷 Eval: Unknown - The webpage contains multiple search results, but the current task is to find the current stock price of NVIDIA.
INFO     [src.agent.custom_agent] 🧠 New Memory:
INFO     [src.agent.custom_agent] ⏳ Task Progress:
5/100: Input 'nvidia stock price' into index 1: {input_text: {index: 1, text: "Nvidia stock price"}}*
INFO     [src.agent.custom_agent] πŸ“‹ Future Plans:
6. Extract the current stock price of NVIDIA from one of the search results: Open the first result and find the current stock price information.
INFO     [src.agent.custom_agent] πŸ€” Thought: To proceed, I need to input 'nvidia stock price' into index 1, then extract the current stock price of NVIDIA from one of the search results.
INFO     [src.agent.custom_agent] 🎯 Summary: Input 'nvidia stock price' into index 1.
INFO     [src.agent.custom_agent] πŸ› οΈ  Action 1/1: {"input_text":{"index":1,"text":"Nvidia stock price"}}
INFO     [src.agent.custom_agent] 🧠 All Memory:
The current URL is https://www.google.com/ and the search bar is currently empty. The first result for "nvidia stock price" is available, showing various options such as 'stock price today', 'stock price chart', etc.
The search bar is empty and does not contain any relevant input for finding the current stock price. However, there are multiple results available on the page, including Market Summary and related news articles.

INFO     [controller] ⌨️  Input "Nvidia stock price" into index 1
INFO     [src.agent.custom_agent]
πŸ“ Step 6
ERROR    [agent] ❌ Result failed 1/5 times:
 Invalid model output format. Please follow the correct schema.
Details: 1 validation error for CustomAgentOutput
action.0.scroll_down.amount
  Input should be a valid integer, unable to parse string as an integer [type=int_parsing, input_value='None', input_type=str]
    For further information visit https://errors.pydantic.dev/2.10/v/int_parsing
INFO     [src.agent.custom_agent]
πŸ“ Step 6
ERROR    [agent] ❌ Result failed 2/5 times:
 Invalid model output format. Please follow the correct schema.
Details: 1 validation error for CustomAgentOutput
action.0.scroll_down.amount
  Input should be a valid integer, unable to parse string as an integer [type=int_parsing, input_value='None', input_type=str]
    For further information visit https://errors.pydantic.dev/2.10/v/int_parsing
INFO     [src.agent.custom_agent]
πŸ“ Step 6
ERROR    [agent] ❌ Result failed 3/5 times:
 Invalid model output format. Please follow the correct schema.
Details: 1 validation error for CustomAgentOutput
action.0.scroll_down.amount
  Input should be a valid integer, unable to parse string as an integer [type=int_parsing, input_value='None', input_type=str]
    For further information visit https://errors.pydantic.dev/2.10/v/int_parsing
INFO     [src.agent.custom_agent]
πŸ“ Step 6
ERROR    [agent] ❌ Result failed 4/5 times:
 Invalid model output format. Please follow the correct schema.
Details: 1 validation error for CustomAgentOutput
action.0.scroll_down.amount
  Input should be a valid integer, unable to parse string as an integer [type=int_parsing, input_value='None', input_type=str]
    For further information visit https://errors.pydantic.dev/2.10/v/int_parsing
INFO     [src.agent.custom_agent]
πŸ“ Step 6
ERROR    [agent] ❌ Result failed 5/5 times:
 Invalid model output format. Please follow the correct schema.
Details: 1 validation error for CustomAgentOutput
action.0.scroll_down.amount
  Input should be a valid integer, unable to parse string as an integer [type=int_parsing, input_value='None', input_type=str]
    For further information visit https://errors.pydantic.dev/2.10/v/int_parsing
ERROR    [agent] ❌ Stopping due to 5 consecutive failures
INFO     [src.agent.custom_agent] Created GIF at agent_history.gif
INFO     [agent] πŸš€ Starting task: Search last 5 top news about IT
INFO     [src.agent.custom_agent]

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