Skip to content

Commit bef677e

Browse files
committed
Update client.py
1 parent 84d8bd2 commit bef677e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/browser_use/wrapper/tasks/client.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import json
22
import typing
33

4-
from pydantic import BaseModel
5-
64
from browser_use.core.request_options import RequestOptions
75
from browser_use.tasks.client import OMIT, AsyncClientWrapper, AsyncTasksClient, SyncClientWrapper, TasksClient
86
from browser_use.types.supported_ll_ms import SupportedLlMs
@@ -140,7 +138,7 @@ def get_task(self, task_id: str, *, request_options: typing.Optional[RequestOpti
140138
def get_task(
141139
self,
142140
task_id: str,
143-
schema: typing.Optional[typing.Union[typing.Type[T], str]] = OMIT,
141+
schema: typing.Optional[typing.Type[T]] = OMIT,
144142
*,
145143
request_options: typing.Optional[RequestOptions] = None,
146144
) -> typing.Union[TaskViewWithOutput[T], TaskView]:
@@ -211,7 +209,7 @@ async def create_task(
211209
start_url: typing.Optional[str] = OMIT,
212210
max_steps: typing.Optional[int] = OMIT,
213211
structured_output: typing.Optional[str] = OMIT,
214-
schema: typing.Optional[typing.Type[BaseModel]] = OMIT,
212+
schema: typing.Optional[typing.Type[T]] = OMIT,
215213
session_id: typing.Optional[str] = OMIT,
216214
metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
217215
secrets: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
@@ -276,7 +274,7 @@ async def get_task(self, task_id: str, *, request_options: typing.Optional[Reque
276274
async def get_task(
277275
self,
278276
task_id: str,
279-
schema: typing.Optional[typing.Union[typing.Type[BaseModel], str]] = OMIT,
277+
schema: typing.Optional[typing.Type[T]] = OMIT,
280278
*,
281279
request_options: typing.Optional[RequestOptions] = None,
282280
) -> typing.Union[TaskViewWithOutput[T], TaskView]:

0 commit comments

Comments
 (0)