mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-04 07:27:51 +00:00
fix(nvidia_nim): declare retrieval top_n as Final[object] for type gate
This commit is contained in:
parent
27a860bcc5
commit
c56f093ccc
1 changed files with 1 additions and 1 deletions
|
|
@ -210,7 +210,7 @@ class NvidiaNimRerankConfig(BaseRerankConfig):
|
|||
if "documents" not in optional_rerank_params:
|
||||
raise ValueError("documents is required for Nvidia NIM rerank")
|
||||
|
||||
top_n: object = optional_rerank_params.get("top_n")
|
||||
top_n: Final[object] = optional_rerank_params.get("top_n")
|
||||
if top_n is not None:
|
||||
if isinstance(top_n, bool) or not isinstance(top_n, int) or top_n < 1:
|
||||
raise ValueError(f"top_n must be a positive integer, got: {top_n!r}")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue