Skip to content

Commit 48150a1

Browse files
committed
fixes
1 parent 1340835 commit 48150a1

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed
File renamed without changes.

examples/async_retrieve.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import asyncio
44
from typing import List
55

6+
from api import API_KEY
67
from pydantic import BaseModel
7-
from utils import API_KEY
88

99
from browser_use import AsyncBrowserUse
1010

examples/async_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import asyncio
44
from typing import List
55

6+
from api import API_KEY
67
from pydantic import BaseModel
7-
from utils import API_KEY
88

99
from browser_use import AsyncBrowserUse
1010

examples/async_stream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import asyncio
44
from typing import List
55

6+
from api import API_KEY
67
from pydantic import BaseModel
7-
from utils import API_KEY
88

99
from browser_use import AsyncBrowserUse
1010

examples/retrieve.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import time
44
from typing import List
55

6+
from api import API_KEY
67
from pydantic import BaseModel
7-
from utils import API_KEY
88

99
from browser_use import BrowserUse
1010

examples/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
from typing import List
44

5+
from api import API_KEY
56
from pydantic import BaseModel
6-
from utils import API_KEY
77

88
from browser_use import BrowserUse
99

examples/stream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
from typing import List
44

5+
from api import API_KEY
56
from pydantic import BaseModel
6-
from utils import API_KEY
77

88
from browser_use import BrowserUse
99

src/browser_use/wrapper/tasks/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def create_task(
8484
system_prompt_extension: typing.Optional[str] = OMIT,
8585
request_options: typing.Optional[RequestOptions] = None,
8686
) -> typing.Union[WrappedStructuredTaskCreatedResponse[T], WrappedTaskCreatedResponse]:
87-
if schema is not None:
87+
if schema is not None and schema is not OMIT:
8888
structured_output = json.dumps(schema.model_json_schema())
8989

9090
res = super().create_task(
@@ -145,7 +145,7 @@ def get_task(
145145
) -> typing.Union[TaskViewWithOutput[T], TaskView]:
146146
res = super().get_task(task_id, request_options=request_options)
147147

148-
if schema is not None:
148+
if schema is not None and schema is not OMIT:
149149
return _parse_task_view_with_output(res, schema)
150150
else:
151151
return res
@@ -219,7 +219,7 @@ async def create_task(
219219
system_prompt_extension: typing.Optional[str] = OMIT,
220220
request_options: typing.Optional[RequestOptions] = None,
221221
) -> typing.Union[AsyncWrappedStructuredTaskCreatedResponse[T], AsyncWrappedTaskCreatedResponse]:
222-
if schema is not None:
222+
if schema is not None and schema is not OMIT:
223223
structured_output = json.dumps(schema.model_json_schema())
224224

225225
res = await super().create_task(
@@ -278,7 +278,7 @@ async def get_task(
278278
) -> typing.Union[TaskViewWithOutput[T], TaskView]:
279279
res = await super().get_task(task_id, request_options=request_options)
280280

281-
if schema is not None:
281+
if schema is not None and schema is not OMIT:
282282
return _parse_task_view_with_output(res, schema)
283283
else:
284284
return res

0 commit comments

Comments
 (0)