diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-08-14 12:45:29 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-08-14 12:45:29 -0700 |
commit | 1c288f7749747c6b1908ae16c977f80e5597d2ca (patch) | |
tree | d2047553c11854f67eab1d6e4e42089b2e7d19a4 | |
parent | 30befdb263a5f2f794869e82666c9edff4b10cd6 (diff) | |
download | sncontinue-1c288f7749747c6b1908ae16c977f80e5597d2ca.tar.gz sncontinue-1c288f7749747c6b1908ae16c977f80e5597d2ca.tar.bz2 sncontinue-1c288f7749747c6b1908ae16c977f80e5597d2ca.zip |
fix: :bug: MAX_TOKENS_FOR_MODEL bug fix, more testing
-rw-r--r-- | .github/workflows/main.yaml | 2 | ||||
-rw-r--r-- | continuedev/src/continuedev/libs/llm/openai.py | 7 | ||||
-rw-r--r-- | extension/src/test-suite/environmentSetup.test.ts | 4 |
3 files changed, 6 insertions, 7 deletions
diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 9475ba68..e545e8d4 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -49,7 +49,7 @@ jobs: needs: pyinstaller strategy: matrix: - os: [macos-latest, ubuntu-20.04, windows-latest] + os: [windows-latest] runs-on: ${{ matrix.os }} diff --git a/continuedev/src/continuedev/libs/llm/openai.py b/continuedev/src/continuedev/libs/llm/openai.py index 5f1ef7fa..7eb516a3 100644 --- a/continuedev/src/continuedev/libs/llm/openai.py +++ b/continuedev/src/continuedev/libs/llm/openai.py @@ -22,11 +22,12 @@ CHAT_MODELS = { MAX_TOKENS_FOR_MODEL = { "gpt-3.5-turbo": 4096, "gpt-3.5-turbo-0613": 4096, - "gpt-3.5-turbo-16k": 16384, + "gpt-3.5-turbo-16k": 16_384, "gpt-4": 8192, - "gpt-35-turbo-16k": 16384, + "gpt-35-turbo-16k": 16_384, "gpt-35-turbo-0613": 4096, "gpt-35-turbo": 4096, + "gpt-4-32k": 32_768 } @@ -67,7 +68,7 @@ class OpenAI(LLM): @property def context_length(self): - return MAX_TOKENS_FOR_MODEL[self.model] + return MAX_TOKENS_FOR_MODEL.get(self.model, 4096) @property def default_args(self): diff --git a/extension/src/test-suite/environmentSetup.test.ts b/extension/src/test-suite/environmentSetup.test.ts index 00bc40ef..59d9f6bb 100644 --- a/extension/src/test-suite/environmentSetup.test.ts +++ b/extension/src/test-suite/environmentSetup.test.ts @@ -2,13 +2,11 @@ import { test, describe } from "mocha"; import * as assert from "assert"; import { getContinueServerUrl } from "../bridge"; -import { ideProtocolClient } from "../activation/activate"; import fetch from "node-fetch"; -import fkill from "fkill"; describe("Can start python server", () => { test("Can start python server in under 35 seconds", async function () { - const allowedTime = 35_000; + const allowedTime = 25_000; this.timeout(allowedTime + 10_000); // try { // fkill(65432, { force: true }); |