Update types in cohere.py (#1635)

Adjust argument type and clarification on parameter limits for
attributes `frequency_penalty` and `presence_penalty`.
This commit is contained in:
Dennis Aumiller 2023-03-13 17:08:32 +01:00 committed by GitHub
parent aed9f9febe
commit 039d05c808
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,11 +41,11 @@ class Cohere(LLM, BaseModel):
p: int = 1 p: int = 1
"""Total probability mass of tokens to consider at each step.""" """Total probability mass of tokens to consider at each step."""
frequency_penalty: int = 0 frequency_penalty: float = 0.0
"""Penalizes repeated tokens according to frequency.""" """Penalizes repeated tokens according to frequency. Between 0 and 1."""
presence_penalty: int = 0 presence_penalty: float = 0.0
"""Penalizes repeated tokens.""" """Penalizes repeated tokens. Between 0 and 1."""
truncate: Optional[str] = None truncate: Optional[str] = None
"""Specify how the client handles inputs longer than the maximum token """Specify how the client handles inputs longer than the maximum token