File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ def search(
85
85
LinkupInsufficientCreditError: If you have run out of credit.
86
86
LinkupNoResultError: If the search query did not yield any result.
87
87
"""
88
- params : Dict [str , str ] = self ._get_search_params (
88
+ params : Dict [str , Union [ str , bool ] ] = self ._get_search_params (
89
89
query = query ,
90
90
depth = depth ,
91
91
output_type = output_type ,
@@ -148,7 +148,7 @@ async def async_search(
148
148
LinkupAuthenticationError: If the Linkup API key is invalid, or there is no more credit
149
149
available.
150
150
"""
151
- params : Dict [str , str ] = self ._get_search_params (
151
+ params : Dict [str , Union [ str , bool ] ] = self ._get_search_params (
152
152
query = query ,
153
153
depth = depth ,
154
154
output_type = output_type ,
@@ -253,7 +253,6 @@ def _get_search_params(
253
253
q = query ,
254
254
depth = depth ,
255
255
outputType = output_type ,
256
- includeImages = include_images ,
257
256
)
258
257
259
258
if output_type == "structured" and structured_output_schema is not None :
@@ -267,6 +266,9 @@ def _get_search_params(
267
266
f"Unexpected structured_output_schema type: '{ type (structured_output_schema )} '"
268
267
)
269
268
269
+ if include_images :
270
+ params ["includeImages" ] = True
271
+
270
272
return params
271
273
272
274
def _validate_search_response (
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class LinkupSearchResults(BaseModel):
41
41
results: The results of the Linkup search.
42
42
"""
43
43
44
- results : List [Union [LinkupSearchTextResult | LinkupSearchImageResult ]]
44
+ results : List [Union [LinkupSearchTextResult , LinkupSearchImageResult ]]
45
45
46
46
47
47
class LinkupSource (BaseModel ):
Original file line number Diff line number Diff line change 1
1
[tool .mypy ]
2
- exclude = [' ^tests/' ]
2
+ exclude = [' ^tests/' , ' venv/ ' , ' .venv/ ' ]
3
3
strict = true
4
4
5
5
[tool .pytest .ini_options ]
You can’t perform that action at this time.
0 commit comments