fix: 🐛 MAX_TOKENS_FOR_MODEL bug fix, more testing
This commit is contained in:
parent
30befdb263
commit
1c288f7749
3 changed files with 6 additions and 7 deletions
2
.github/workflows/main.yaml
vendored
2
.github/workflows/main.yaml
vendored
|
|
@ -49,7 +49,7 @@ jobs:
|
|||
needs: pyinstaller
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-20.04, windows-latest]
|
||||
os: [windows-latest]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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 });
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue