Fix default value for k parameter and add default value for searx_host parameter

This commit is contained in:
anovazzi1 2024-01-25 16:40:58 -03:00
commit 9c06b16eb3
2 changed files with 6 additions and 3 deletions

View file

@ -26,8 +26,8 @@ class SearxSearchWrapperComponent(CustomComponent):
def build(
self,
k: Optional[int] = 10,
k: int = 10,
headers: Optional[Dict[str, str]] = None,
searx_host: Optional[str] = None,
searx_host: str = "https://searx.example.com",
) -> SearxSearchWrapper:
return SearxSearchWrapper(headers=headers, k=k, searx_host=searx_host)

View file

@ -24,4 +24,7 @@ class SerpAPIWrapperComponent(CustomComponent):
serpapi_api_key: str,
params: dict,
) -> Union[SerpAPIWrapper, Callable]: # Removed quotes around SerpAPIWrapper
return SerpAPIWrapper(serpapi_api_key=serpapi_api_key, params=params)
return SerpAPIWrapper(
serpapi_api_key=serpapi_api_key,
params=params,
)