mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-17 09:34:48 +00:00
Merge e020fab1e6 into 017e08aba3
This commit is contained in:
commit
87adcd5e76
1 changed files with 6 additions and 0 deletions
|
|
@ -78,6 +78,8 @@ class HuggingFaceRerankConfig(BaseRerankConfig):
|
|||
"documents",
|
||||
"top_n",
|
||||
"return_documents",
|
||||
"truncate",
|
||||
"truncation_direction",
|
||||
]
|
||||
|
||||
def map_cohere_rerank_params(
|
||||
|
|
@ -108,6 +110,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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue