Skip to content

Commit

Permalink
merge core/test/llm.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Calvinn Ng committed Jul 25, 2024
1 parent 6cb456a commit 333221f
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions core/test/llm.test.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
import * as dotenv from "dotenv";

<<<<<<< HEAD
import { CompletionOptions } from "..";
import { BaseLLM } from "../llm";

jest.setTimeout(100_000);
=======
import { CompletionOptions } from "../index.js";
import { BaseLLM } from "../llm/index.js";
import OpenAI from "../llm/llms/OpenAI.js";

// jest.setTimeout(100_000);
>>>>>>> v0.9.184-vscode

dotenv.config();

Expand Down Expand Up @@ -40,10 +33,6 @@ function testLLM(llm: BaseLLM) {
}

expect(total.length).toBeGreaterThan(0);
<<<<<<< HEAD
console.log(total);
=======
>>>>>>> v0.9.184-vscode
return;
});

Expand All @@ -54,21 +43,13 @@ function testLLM(llm: BaseLLM) {
}

expect(total.length).toBeGreaterThan(0);
<<<<<<< HEAD
console.log(total);
=======
>>>>>>> v0.9.184-vscode
return;
});

test("Complete works", async () => {
const completion = await llm.complete("Hi");

expect(completion.length).toBeGreaterThan(0);
<<<<<<< HEAD
console.log(completion);
=======
>>>>>>> v0.9.184-vscode
return;
});
});
Expand All @@ -78,29 +59,17 @@ describe("LLM", () => {
// testLLM(
// new FreeTrial({
// model: "gpt-3.5-turbo",
<<<<<<< HEAD
// })
=======
// }),
>>>>>>> v0.9.184-vscode
// );
// testLLM(
// new Anthropic({
// model: "claude-2",
// apiKey: process.env.ANTHROPIC_API_KEY,
<<<<<<< HEAD
// })
// );
// testLLM(
// new OpenAI({ apiKey: process.env.OPENAI_API_KEY, model: "gpt-3.5-turbo" })
// );
=======
// }),
// );
testLLM(
new OpenAI({ apiKey: process.env.OPENAI_API_KEY, model: "gpt-3.5-turbo" }),
);
>>>>>>> v0.9.184-vscode
// TODO: Fix Replicate
// testLLM(
// new Replicate({
Expand All @@ -123,11 +92,7 @@ describe("LLM", () => {
// testLLM(new HuggingFaceTGI({ model: "codellama-7b" }));
// testLLM(new HuggingFaceInferenceAPI({ model: "codellama-7b" }));
// testLLM(
<<<<<<< HEAD
// new GooglePalm({
=======
// new Gemini({
>>>>>>> v0.9.184-vscode
// model: "gemini-pro",
// // model: "chat-bison-001",
// apiKey: process.env.GOOGLE_PALM_API_KEY,
Expand Down

0 comments on commit 333221f

Please sign in to comment.