Skip to content

Commit 645ee2d

Browse files
committed
fix action space
1 parent b82aef0 commit 645ee2d

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

src/agentlab/actions.py

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import json
22
import logging
3-
from typing import Literal
43

54
from bgym import AbstractActionSet
6-
from pydantic import BaseModel, Field
75

86
from agentlab.backends.browser.base import FunctionCall, ToolCallAction, ToolSpec
97
from agentlab.llm.llm_utils import parse_html_tags_raise
@@ -28,27 +26,22 @@ def describe(self, with_long_description: bool = True, with_examples: bool = Tru
2826

2927
def example_action(self, abstract: bool) -> str:
3028
if abstract:
31-
return """<action>
32-
{
29+
return """{
3330
"name": "<action_name>",
3431
"arguments": {
3532
"<argument_name_1>": "<argument_value_1>",
3633
"<argument_name_2>": "<argument_value_2>",
3734
...
3835
}
39-
}
40-
</action>
41-
"""
36+
}"""
4237
else:
43-
return """<action>
44-
{
45-
"name": "browser_navigate",
38+
return """{
39+
"name": "browser_click",
4640
"arguments": {
47-
"url": "https://www.google.com"
41+
"element": "buttom with year 2022",
42+
"ref": "e26"
4843
}
49-
}
50-
</action>
51-
"""
44+
}"""
5245

5346
@classmethod
5447
def parse_action(cls, llm_output: str) -> ToolCallAction:

0 commit comments

Comments
 (0)