This commit is contained in:
vincent
2025-01-27 20:14:29 +08:00
parent b9080c3b18
commit dc72b5d862
3 changed files with 4 additions and 2 deletions

View File

@@ -56,7 +56,7 @@ class CustomSystemPrompt(SystemPrompt):
- Use scroll to find elements you are looking for
5. TASK COMPLETION:
- If you think all the requirements of user\'s instruction have been completed and no further operation is required, output the done action to terminate the operation process.
- If you think all the requirements of user\'s instruction have been completed and no further operation is required, output the **Done** action to terminate the operation process.
- Don't hallucinate actions.
- If the task requires specific information - make sure to include everything in the done function. This is what the user will see.
- If you are running out of steps (current step), think about speeding it up, and ALWAYS use the done action as the last action.

View File

@@ -3,7 +3,7 @@ from typing import Optional, Type
from pydantic import BaseModel
from browser_use.agent.views import ActionResult
from browser_use.browser.context import BrowserContext
from browser_use.controller.service import Controller
from browser_use.controller.service import Controller, DoneAction
class CustomController(Controller):

View File

@@ -99,6 +99,7 @@ def get_llm_model(provider: str, **kwargs):
model=kwargs.get("model_name", "deepseek-r1:7b"),
temperature=kwargs.get("temperature", 0.0),
num_ctx=kwargs.get("num_ctx", 32000),
num_predict=kwargs.get("num_predict", 1024),
base_url=kwargs.get("base_url", base_url),
)
else:
@@ -106,6 +107,7 @@ def get_llm_model(provider: str, **kwargs):
model=kwargs.get("model_name", "qwen2.5:7b"),
temperature=kwargs.get("temperature", 0.0),
num_ctx=kwargs.get("num_ctx", 32000),
num_predict=kwargs.get("num_predict", 1024),
base_url=kwargs.get("base_url", base_url),
)
elif provider == "azure_openai":