community[patch]: fix top_p type hint (#15452)

fix: https://github.com/langchain-ai/langchain/issues/15341

@efriis
This commit is contained in:
chyroc
2024-01-16 03:59:39 +08:00
committed by GitHub
parent 251afda549
commit d334efc848
4 changed files with 4 additions and 4 deletions

View File

@@ -38,7 +38,7 @@ class NLPCloud(LLM):
"""Whether or not to remove the end sequence token."""
bad_words: List[str] = []
"""List of tokens not allowed to be generated."""
top_p: int = 1
top_p: float = 1.0
"""Total probability mass of tokens to consider at each step."""
top_k: int = 50
"""The number of highest probability tokens to keep for top-k filtering."""