Skip to content

Commit

Permalink
Working on it
Browse files Browse the repository at this point in the history
  • Loading branch information
ankrgyl committed Sep 6, 2023
1 parent 9433266 commit 9bb0e4f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
17 changes: 17 additions & 0 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
testEnvironment: "node",
transform: {
"\\.yaml$": "jest-text-transformer",
"\\.[jt]sx?$": "ts-jest",
},
globals: {
"ts-jest": {
useESM: true,
},
},
moduleNameMapper: {
"(.+)\\.js": "$1",
},
extensionsToTreatAsEsm: [".ts"],
};
9 changes: 0 additions & 9 deletions jest.config.js

This file was deleted.

8 changes: 3 additions & 5 deletions node/llm.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import path from "path";

import { Battle, LLMClassifierFromTemplate, OpenAIClassifier } from "../js/llm";
import { ChatCompletionRequestMessage } from "openai";
import { ChatCache } from "../js/oai";
Expand Down Expand Up @@ -59,7 +57,7 @@ Nicolo also dropped this as a reference: http://spec.openapis.org/oas/v3.0.3#ope

expect(score.score).toBe(1);
expect(score.error).toBeUndefined();
}, 60000);
}, 600000);

test("llm_classifier", async () => {
const pageContent = `As suggested by Nicolo, we should standardize the error responses coming from GoTrue, postgres, and realtime (and any other/future APIs) so that it's better DX when writing a client,
Expand Down Expand Up @@ -106,7 +104,7 @@ Issue Description: {{page_content}}
expect(response.score).toBe(0);
expect(response.error).toBeUndefined();
}
}, 60000);
}, 600000);

test("battle", async () => {
for (const useCoT of [true, false]) {
Expand Down Expand Up @@ -144,4 +142,4 @@ test("battle", async () => {
expect(response.score).toBe(0);
expect(response.error).toBeUndefined();
}
}, 60000);
}, 600000);

0 comments on commit 9bb0e4f

Please sign in to comment.