diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-09-28 11:30:17 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-09-28 11:30:17 -0700 |
commit | b2a6d07ea99be1f9288ee21477edc0874e780cad (patch) | |
tree | 4dc3e54a9e97102f0c0abadecf8f0985f03db110 | |
parent | a7cb0929bd064f73a1e3e49ba8dd6b6b7de387f4 (diff) | |
download | sncontinue-b2a6d07ea99be1f9288ee21477edc0874e780cad.tar.gz sncontinue-b2a6d07ea99be1f9288ee21477edc0874e780cad.tar.bz2 sncontinue-b2a6d07ea99be1f9288ee21477edc0874e780cad.zip |
fix: :bug: don't override context length param in OpenAI
-rw-r--r-- | continuedev/src/continuedev/libs/llm/openai.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/continuedev/src/continuedev/libs/llm/openai.py b/continuedev/src/continuedev/libs/llm/openai.py index d21bbde1..d9e74cec 100644 --- a/continuedev/src/continuedev/libs/llm/openai.py +++ b/continuedev/src/continuedev/libs/llm/openai.py @@ -81,7 +81,8 @@ class OpenAI(LLM): ): await super().start(write_log=write_log, unique_id=unique_id) - self.context_length = MAX_TOKENS_FOR_MODEL.get(self.model, 4096) + if self.context_length is None: + self.context_length = MAX_TOKENS_FOR_MODEL.get(self.model, 4096) openai.api_key = self.api_key if self.api_type is not None: |