Skip to content

Commit 210251c

Browse files
committed
Update BrowserUse inputs
1 parent 2cdd501 commit 210251c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

patchwork/steps/BrowserUse/BrowserUse.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def __init__(self, inputs):
2323
raise ValueError(f'Missing required data: "{self.required_keys}"')
2424

2525
self.browser = Browser(config=config)
26+
2627
if "google_api_key" in self.inputs:
2728
self.llm = ChatGoogleGenerativeAI(
2829
model="gemini-2.0-flash", google_api_key=self.inputs["google_api_key"]
@@ -53,7 +54,7 @@ def run(self) -> dict:
5354
loop = asyncio.new_event_loop()
5455
self.history = loop.run_until_complete(agent.run())
5556

56-
if self.inputs["json_example_schema"]:
57+
if "example_json" in self.inputs:
5758
return self.__format_history_as_json()
5859

5960
return {
@@ -74,7 +75,7 @@ def __format_history_as_json(self):
7475
{self.history.final_result()}
7576
</history>
7677
""",
77-
json_schema=self.inputs["json_example_schema"],
78+
json_schema=self.inputs["example_json"],
7879
prompt_value=dict(),
7980
)
8081

patchwork/steps/BrowserUse/typed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
class BrowserUseInputs(TypedDict, total=False):
77
task: str
8-
json_example_schema: str
8+
example_json: str
99
openai_api_key: Annotated[
1010
str,
1111
StepTypeConfig(is_config=True, or_op=["google_api_key", "anthropic_api_key"]),

0 commit comments

Comments
 (0)