From 9f044167687a2aea7050ba9a9001cfa605f9c9b0 Mon Sep 17 00:00:00 2001 From: Erick Friis Date: Mon, 2 Dec 2024 15:30:32 -0800 Subject: [PATCH] openai: set logit_bias to none instead of empty dict by default (#28460) --- libs/partners/openai/langchain_openai/llms/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/partners/openai/langchain_openai/llms/base.py b/libs/partners/openai/langchain_openai/llms/base.py index 633d473ae81d5..dc5dd67099b08 100644 --- a/libs/partners/openai/langchain_openai/llms/base.py +++ b/libs/partners/openai/langchain_openai/llms/base.py @@ -113,7 +113,7 @@ class BaseOpenAI(BaseLLM): ) """Timeout for requests to OpenAI completion API. Can be float, httpx.Timeout or None.""" - logit_bias: Optional[Dict[str, float]] = Field(default_factory=dict) + logit_bias: Optional[Dict[str, float]] = None """Adjust the probability of specific tokens being generated.""" max_retries: int = 2 """Maximum number of retries to make when generating."""