From 47ba5ef285430fdeb7ce6e7dd237e28fa235fc32 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 16 Nov 2023 12:07:32 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20override=20defaults=20for=20mode?= =?UTF-8?q?l=20completion=20options?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/continuedev/core/config.py | 4 +++- server/continuedev/libs/util/count_tokens.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server/continuedev/core/config.py b/server/continuedev/core/config.py index 2c99d8814..5d7810c26 100644 --- a/server/continuedev/core/config.py +++ b/server/continuedev/core/config.py @@ -315,7 +315,9 @@ class SerializedContinueConfig(BaseModel): def create_llm(model: ModelDescription) -> LLM: model_class = MODEL_CLASSES[MODEL_PROVIDER_TO_MODEL_CLASS[model.provider]] completion_options = self.completion_options.dict() - completion_options.update(model.completion_options.dict(exclude_none=True)) + completion_options.update( + model.completion_options.dict(exclude_none=True, exclude_defaults=True) + ) # Allow extra fields to be passed through kwargs = {**model.dict(exclude_none=True)} diff --git a/server/continuedev/libs/util/count_tokens.py b/server/continuedev/libs/util/count_tokens.py index d6fe0f1fe..bf4fa4519 100644 --- a/server/continuedev/libs/util/count_tokens.py +++ b/server/continuedev/libs/util/count_tokens.py @@ -14,7 +14,7 @@ aliases = { "ggml": "gpt-3.5-turbo", "claude-2": "gpt-3.5-turbo", } -DEFAULT_MAX_TOKENS = 600 +DEFAULT_MAX_TOKENS = 1000 DEFAULT_ARGS = { "max_tokens": DEFAULT_MAX_TOKENS, "temperature": 0.5,