web-ui icon indicating copy to clipboard operation
web-ui copied to clipboard

'str' object has no attribute 'model_dump'

Open DaxYang-03 opened this issue 10 months ago β€’ 3 comments

To create a public link, set share=True in launch(). INFO [agent] πŸš€ Starting task: εŽ»η™ΎεΊ¦ζœη΄’ζ–°ι—» INFO [src.agent.custom_agent] πŸ“ Step 1 ERROR [agent] ❌ Result failed 1/5 times: 'str' object has no attribute 'model_dump' INFO [src.agent.custom_agent] πŸ“ Step 1 ERROR [agent] ❌ Result failed 2/5 times: 'str' object has no attribute 'model_dump' INFO [src.agent.custom_agent] πŸ“ Step 1 ERROR [agent] ❌ Result failed 3/5 times: 'str' object has no attribute 'model_dump' INFO [src.agent.custom_agent] πŸ“ Step 1 ERROR [agent] ❌ Result failed 4/5 times: 'str' object has no attribute 'model_dump' INFO [src.agent.custom_agent] πŸ“ Step 1 ERROR [agent] ❌ Result failed 5/5 times: 'str' object has no attribute 'model_dump' ERROR [agent] ❌ Stopping due to 5 consecutive failures WARNING [src.agent.custom_agent] No history or first screenshot to create GIF from

DaxYang-03 avatar Feb 13 '25 02:02 DaxYang-03

browser-use version?

warmshao avatar Feb 14 '25 11:02 warmshao

I just installed this project yesterday. I think it should be the latest version.

I've found the conditions for reproducing this error: it occurs when I use a custom API address and the API addresses filled in the.env file and the web client are inconsistent.

I thought that if I filled it in on the web client, it wouldn't read the address I set in the.env file anymore.

DaxYang-03 avatar Feb 14 '25 11:02 DaxYang-03

it occurs when I use a custom API address and the API addresses filled in the.env file and the web client are inconsistent.

Did you also set the Base URL of the provider you are using in the web client? And also make sure the LLM providers you select from selector is compatible with your custom provider. The default option (openai) should be the safest.

I thought that if I filled it in on the web client, it wouldn't read the address I set in the.env file anymore.

The web client does take a higher priority than the .env file. Just make sure the LLM provider you choose in the web client is a compatible one, and set the Base URL and the API key appropriately.

Could you perhaps share which environment variable you set in the .env file? As well as what specific inconsistencies between the two that led to the error?

marginal23326 avatar Feb 14 '25 14:02 marginal23326