mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-26 08:33:49 +00:00
fix self query constructor (#12349)
This commit is contained in:
parent
f05c29180d
commit
f5a57fc1ef
@ -203,11 +203,17 @@ class SelfQueryRetriever(BaseRetriever, BaseModel):
|
||||
structured_query_translator = _get_builtin_translator(vectorstore)
|
||||
chain_kwargs = chain_kwargs or {}
|
||||
|
||||
if "allowed_comparators" not in chain_kwargs:
|
||||
if (
|
||||
"allowed_comparators" not in chain_kwargs
|
||||
and structured_query_translator.allowed_comparators is not None
|
||||
):
|
||||
chain_kwargs[
|
||||
"allowed_comparators"
|
||||
] = structured_query_translator.allowed_comparators
|
||||
if "allowed_operators" not in chain_kwargs:
|
||||
if (
|
||||
"allowed_operators" not in chain_kwargs
|
||||
and structured_query_translator.allowed_operators is not None
|
||||
):
|
||||
chain_kwargs[
|
||||
"allowed_operators"
|
||||
] = structured_query_translator.allowed_operators
|
||||
|
Loading…
Reference in New Issue
Block a user