From 91af281a9d54f2fd667365fb19dd609eb1301ada Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Wed, 6 Nov 2024 13:00:39 -0500 Subject: [PATCH] Refactor OpenAI provider in simplemind Update the DEFAULT_MAX_TOKENS and DEFAULT_KWARGS variables in the OpenAI provider module in simplemind. Set DEFAULT_MAX_TOKENS to None and DEFAULT_KWARGS to an empty dictionary. This refactor allows for more flexibility in configuring the OpenAI provider. --- simplemind/providers/openai.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simplemind/providers/openai.py b/simplemind/providers/openai.py index 97b4a9a..58e4e21 100644 --- a/simplemind/providers/openai.py +++ b/simplemind/providers/openai.py @@ -15,8 +15,8 @@ T = TypeVar("T", bound=BaseModel) PROVIDER_NAME = "openai" DEFAULT_MODEL = "gpt-4o-mini" -DEFAULT_MAX_TOKENS = 1_000 -DEFAULT_KWARGS = {"max_tokens": DEFAULT_MAX_TOKENS} +DEFAULT_MAX_TOKENS = None +DEFAULT_KWARGS = {} class OpenAI(BaseProvider):