web-ui: Error when using DeepSeek on Ollama
It runs with ‘qwen2.5:7b’ so it must be specific to ‘deepseek-r1:14b’ model? Maybe it’s not parsing the data properly? I’m on MacOS and not sure if that’s the issue. I checked off the vision also.
INFO [src.agent.custom_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: Expecting value: line 1 column 1 (char 0) INFO [src.agent.custom_agent] 📍 Step 1 ERROR [agent] ❌ Result failed 2/5 times: Expecting value: line 1 column 1 (char 0) INFO [src.agent.custom_agent] 📍 Step 1 ERROR [agent] ❌ Result failed 3/5 times: Expecting value: line 1 column 1 (char 0) INFO [src.agent.custom_agent] 📍 Step 1 ERROR [agent] ❌ Result failed 4/5 times: Expecting value: line 1 column 1 (char 0) INFO [src.agent.custom_agent] 📍 Step 1 ERROR [agent] ❌ Result failed 5/5 times: Expecting value: line 1 column 1 (char 0) ERROR [agent] ❌ Stopping due to 5 consecutive failures WARNING [src.agent.custom_agent] No history or first screenshot to create GIF from
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 20 (2 by maintainers)
and pip install -r requirements.txt, i also update to adapt latest version of browser-use
please update the latest code and try again. recommend use deepseek-r1:14b or bigger. i try 7b and 8b, sometimes it failed to parse json. and please remember uncheck Use Vision.
it breaks with any other models than deepseek r1 thru ollama. Will revise tomorrow
web-ui > src > agent > custom_agent.py
Under CustomAgent class, add:
Replace get_next_action:
web-ui > src > utils > utils.py
Replace qwen2.5:7b with deepseek-r1:14b:
Add deepseek-r1:14b to model dropdown:
model_names = { “anthropic”: [“claude-3-5-sonnet-20240620”, “claude-3-opus-20240229”], “openai”: [“gpt-4o”, “gpt-4”, “gpt-3.5-turbo”], “deepseek”: [“deepseek-chat”, “deepseek-reasoner”], “gemini”: [“gemini-2.0-flash-exp”, “gemini-2.0-flash-thinking-exp”, “gemini-1.5-flash-latest”, “gemini-1.5-flash-8b-latest”, “gemini-2.0-flash-thinking-exp-1219” ], “ollama”: [“qwen2.5:7b”, “llama2:7b”, “deepseek-r1:14b”], “azure_openai”: [“gpt-4o”, “gpt-4”, “gpt-3.5-turbo”] }