@@ -50,7 +50,7 @@ def search(
50
50
depth : Literal ["standard" , "deep" ],
51
51
output_type : Literal ["searchResults" , "sourcedAnswer" , "structured" ],
52
52
structured_output_schema : Union [Type [BaseModel ], str , None ] = None ,
53
- include_images : Union [ bool , None ] = None ,
53
+ include_images : bool = False ,
54
54
) -> Any :
55
55
"""
56
56
Search for a query in the Linkup API.
@@ -67,7 +67,7 @@ def search(
67
67
output. Supported formats are a pydantic.BaseModel or a string representing a
68
68
valid object JSON schema.
69
69
include_images: If output_type is "searchResults", specifies if the response can include
70
- images.
70
+ images. Default to False.
71
71
72
72
Returns:
73
73
The Linkup API search result. If output_type is "searchResults", the result will be a
@@ -114,7 +114,7 @@ async def async_search(
114
114
depth : Literal ["standard" , "deep" ],
115
115
output_type : Literal ["searchResults" , "sourcedAnswer" , "structured" ],
116
116
structured_output_schema : Union [Type [BaseModel ], str , None ] = None ,
117
- include_images : Union [ bool , None ] = None ,
117
+ include_images : bool = False ,
118
118
) -> Any :
119
119
"""
120
120
Asynchronously search for a query in the Linkup API.
@@ -131,7 +131,7 @@ async def async_search(
131
131
output. Supported formats are a pydantic.BaseModel or a string representing a
132
132
valid object JSON schema.
133
133
include_images: If output_type is "searchResults", specifies if the response can include
134
- images.
134
+ images. Default to False
135
135
136
136
Returns:
137
137
The Linkup API search result. If output_type is "searchResults", the result will be a
@@ -247,12 +247,13 @@ def _get_search_params(
247
247
depth : Literal ["standard" , "deep" ],
248
248
output_type : Literal ["searchResults" , "sourcedAnswer" , "structured" ],
249
249
structured_output_schema : Union [Type [BaseModel ], str , None ],
250
- include_images : Union [ bool , None ] = None ,
250
+ include_images : bool ,
251
251
) -> Dict [str , Union [str , bool ]]:
252
252
params : Dict [str , Union [str , bool ]] = dict (
253
253
q = query ,
254
254
depth = depth ,
255
255
outputType = output_type ,
256
+ includeImages = include_images ,
256
257
)
257
258
258
259
if output_type == "structured" and structured_output_schema is not None :
@@ -266,9 +267,6 @@ def _get_search_params(
266
267
f"Unexpected structured_output_schema type: '{ type (structured_output_schema )} '"
267
268
)
268
269
269
- if include_images :
270
- params ["includeImages" ] = True
271
-
272
270
return params
273
271
274
272
def _validate_search_response (
0 commit comments