From 7827f0a844f28453b2af4146984450b21c23e914 Mon Sep 17 00:00:00 2001 From: Harrison Chase Date: Sat, 10 Dec 2022 20:31:55 -0800 Subject: [PATCH] fix typing (int -> float) (#308) --- langchain/llms/openai.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/langchain/llms/openai.py b/langchain/llms/openai.py index 8ed2af8a1e2..22070c1a4a0 100644 --- a/langchain/llms/openai.py +++ b/langchain/llms/openai.py @@ -30,11 +30,11 @@ class OpenAI(LLM, BaseModel): """What sampling temperature to use.""" max_tokens: int = 256 """The maximum number of tokens to generate in the completion.""" - top_p: int = 1 + top_p: float = 1 """Total probability mass of tokens to consider at each step.""" - frequency_penalty: int = 0 + frequency_penalty: float = 0 """Penalizes repeated tokens according to frequency.""" - presence_penalty: int = 0 + presence_penalty: float = 0 """Penalizes repeated tokens.""" n: int = 1 """How many completions to generate for each prompt."""