Add searx_host parameter to SearxSearchWrapperComponent

This commit is contained in:
anovazzi1 2024-01-15 22:48:13 -03:00
commit e7899480af

View file

@ -19,11 +19,18 @@ class SearxSearchWrapperComponent(CustomComponent):
"field_type": "int", "field_type": "int",
"value": 10 "value": 10
}, },
"searx_host": {
"display_name": "Searx Host",
"field_type": "str",
"value": "https://searx.example.com",
"advanced": True,
},
} }
def build( def build(
self, self,
k: Optional[int] = 10, k: Optional[int] = 10,
headers: Optional[Dict[str, str]] = None, headers: Optional[Dict[str, str]] = None,
): searx_host: Optional[str] = None,
return SearxSearchWrapper(headers=headers,k=k) )->SearxSearchWrapper:
return SearxSearchWrapper(headers=headers,k=k,searx_host=searx_host)