Fix default value for k parameter and add default value for searx_host parameter
This commit is contained in:
parent
ce39b75c37
commit
9c06b16eb3
2 changed files with 6 additions and 3 deletions
|
|
@ -26,8 +26,8 @@ class SearxSearchWrapperComponent(CustomComponent):
|
||||||
|
|
||||||
def build(
|
def build(
|
||||||
self,
|
self,
|
||||||
k: Optional[int] = 10,
|
k: int = 10,
|
||||||
headers: Optional[Dict[str, str]] = None,
|
headers: Optional[Dict[str, str]] = None,
|
||||||
searx_host: Optional[str] = None,
|
searx_host: str = "https://searx.example.com",
|
||||||
) -> SearxSearchWrapper:
|
) -> SearxSearchWrapper:
|
||||||
return SearxSearchWrapper(headers=headers, k=k, searx_host=searx_host)
|
return SearxSearchWrapper(headers=headers, k=k, searx_host=searx_host)
|
||||||
|
|
|
||||||
|
|
@ -24,4 +24,7 @@ class SerpAPIWrapperComponent(CustomComponent):
|
||||||
serpapi_api_key: str,
|
serpapi_api_key: str,
|
||||||
params: dict,
|
params: dict,
|
||||||
) -> Union[SerpAPIWrapper, Callable]: # Removed quotes around SerpAPIWrapper
|
) -> 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,
|
||||||
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue