|
1 | 1 | import json
|
2 | 2 | import os
|
3 |
| -from datetime import datetime |
| 3 | +from datetime import date |
4 | 4 | from typing import Any, Dict, Literal, Optional, Type, Union
|
5 | 5 |
|
6 | 6 | import httpx
|
@@ -52,8 +52,8 @@ def search(
|
52 | 52 | output_type: Literal["searchResults", "sourcedAnswer", "structured"],
|
53 | 53 | structured_output_schema: Union[Type[BaseModel], str, None] = None,
|
54 | 54 | include_images: bool = False,
|
55 |
| - from_date: Union[datetime, None] = None, |
56 |
| - to_date: Union[datetime, None] = None, |
| 55 | + from_date: Union[date, None] = None, |
| 56 | + to_date: Union[date, None] = None, |
57 | 57 | ) -> Any:
|
58 | 58 | """
|
59 | 59 | Search for a query in the Linkup API.
|
@@ -278,8 +278,8 @@ def _get_search_params(
|
278 | 278 | output_type: Literal["searchResults", "sourcedAnswer", "structured"],
|
279 | 279 | structured_output_schema: Union[Type[BaseModel], str, None],
|
280 | 280 | include_images: bool,
|
281 |
| - from_date: Union[datetime, None] = None, |
282 |
| - to_date: Union[datetime, None] = None, |
| 281 | + from_date: Union[date, None] = None, |
| 282 | + to_date: Union[date, None] = None, |
283 | 283 | ) -> Dict[str, Union[str, bool]]:
|
284 | 284 | params: Dict[str, Union[str, bool]] = dict(
|
285 | 285 | q=query,
|
|
0 commit comments