This commit is contained in:
Luke Schaefer 2026-11-05 19:52:39 +00:00 • committed by GitHub
commit 6b36dabe68
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -114,6 +114,10 @@ class HuggingFaceRerankConfig(BaseRerankConfig):
optional_rerank_params["texts"] = v
elif k == "query" and v is not None:
optional_rerank_params["query"] = v
elif k == "truncate" and v is not None and isinstance(v, bool):
optional_rerank_params["truncate"] = v
elif k == "truncation_direction" and v is not None:
optional_rerank_params["truncation_direction"] = v
return OptionalRerankParams(**optional_rerank_params)