openai: set logit_bias to none instead of empty dict by default (#28460)

This commit is contained in:
Erick Friis 2024-12-02 15:30:32 -08:00 committed by GitHub
parent ecee41ab72
commit 9f04416768
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -113,7 +113,7 @@ class BaseOpenAI(BaseLLM):
) )
"""Timeout for requests to OpenAI completion API. Can be float, httpx.Timeout or """Timeout for requests to OpenAI completion API. Can be float, httpx.Timeout or
None.""" 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.""" """Adjust the probability of specific tokens being generated."""
max_retries: int = 2 max_retries: int = 2
"""Maximum number of retries to make when generating.""" """Maximum number of retries to make when generating."""