Skip to content

Commit

Permalink
fix(ci): Fix ci (#6741)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblee93 authored Sep 11, 2024
1 parent 87ce560 commit 7fbae88
Show file tree
Hide file tree
Showing 13 changed files with 0 additions and 97 deletions.
8 changes: 0 additions & 8 deletions environment_tests/test-exports-bun/src/import.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ async function test() {
const { MemoryVectorStore } = await import("langchain/vectorstores/memory");
const { OpenAIEmbeddings } = await import("@langchain/openai");
const { Document } = await import("@langchain/core/documents");
const { CSVLoader } = await import("@langchain/community/document_loaders/fs/csv");

// Test exports
assert(typeof OpenAI === "function");
Expand All @@ -32,13 +31,6 @@ async function test() {
);

assert((await vs.similaritySearchVectorWithScore([0, 0, 1], 1)).length === 1);

// Test CSVLoader
const loader = new CSVLoader(new Blob(["a,b,c\n1,2,3\n4,5,6"]));

const docs = await loader.load();

assert(docs.length === 2);
}

test()
Expand Down
8 changes: 0 additions & 8 deletions environment_tests/test-exports-bun/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { ChatPromptTemplate } from "@langchain/core/prompts";
import { MemoryVectorStore } from "langchain/vectorstores/memory";
import { OpenAIEmbeddings } from "@langchain/openai";
import { Document } from "@langchain/core/documents";
import { CSVLoader } from "@langchain/community/document_loaders/fs/csv";
import { CallbackManager } from "@langchain/core/callbacks/manager";

// Test exports
Expand Down Expand Up @@ -34,10 +33,3 @@ await vs.addVectors(
);

assert((await vs.similaritySearchVectorWithScore([0, 0, 1], 1)).length === 1);

// Test CSVLoader
const loader = new CSVLoader(new Blob(["a,b,c\n1,2,3\n4,5,6"]));

const docs = await loader.load();

assert(docs.length === 2);
8 changes: 0 additions & 8 deletions environment_tests/test-exports-bun/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { ChatPromptTemplate } from "@langchain/core/prompts";
import { MemoryVectorStore } from "langchain/vectorstores/memory";
import { OpenAIEmbeddings } from "@langchain/openai";
import { Document } from "@langchain/core/documents";
import { CSVLoader } from "@langchain/community/document_loaders/fs/csv";

async function test(useAzure: boolean = false) {
// Test exports
Expand Down Expand Up @@ -44,13 +43,6 @@ async function test(useAzure: boolean = false) {
);

assert((await vs.similaritySearchVectorWithScore([0, 0, 1], 1)).length === 1);

// Test CSVLoader
const loader = new CSVLoader(new Blob(["a,b,c\n1,2,3\n4,5,6"]));

const docs = await loader.load();

assert(docs.length === 2);
}

test(false)
Expand Down
8 changes: 0 additions & 8 deletions environment_tests/test-exports-bun/src/require.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const { ChatPromptTemplate } = require("@langchain/core/prompts");
const { MemoryVectorStore } = require("langchain/vectorstores/memory");
const { OpenAIEmbeddings } = require("@langchain/openai");
const { Document } = require("@langchain/core/documents");
const { CSVLoader } = require("@langchain/community/document_loaders/fs/csv");

async function test() {
// Test exports
Expand All @@ -32,13 +31,6 @@ async function test() {
);

assert((await vs.similaritySearchVectorWithScore([0, 0, 1], 1)).length === 1);

// Test CSVLoader
const loader = new CSVLoader(new Blob(["a,b,c\n1,2,3\n4,5,6"]));

const docs = await loader.load();

assert(docs.length === 2);
}

test()
Expand Down
8 changes: 0 additions & 8 deletions environment_tests/test-exports-cjs/src/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ async function test() {
const { HNSWLib } = await import("@langchain/community/vectorstores/hnswlib");
const { HuggingFaceTransformersEmbeddings } = await import("@langchain/community/embeddings/hf_transformers");
const { Document } = await import("@langchain/core/documents");
const { CSVLoader } = await import("@langchain/community/document_loaders/fs/csv");

// Test exports
assert(typeof OpenAI === "function");
Expand Down Expand Up @@ -39,13 +38,6 @@ async function test() {
);

assert((await vs.similaritySearchVectorWithScore([0, 0, 1], 1)).length === 1);

// Test CSVLoader
const loader = new CSVLoader(new Blob(["a,b,c\n1,2,3\n4,5,6"]));

const docs = await loader.load();

assert(docs.length === 2);
}

test()
Expand Down
8 changes: 0 additions & 8 deletions environment_tests/test-exports-cjs/src/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { HNSWLib } from "@langchain/community/vectorstores/hnswlib";
import { ChatPromptTemplate } from "@langchain/core/prompts";
import { HuggingFaceTransformersEmbeddings } from "@langchain/community/embeddings/hf_transformers";
import { Document } from "@langchain/core/documents";
import { CSVLoader } from "@langchain/community/document_loaders/fs/csv";

// Test exports
assert(typeof OpenAI === "function");
Expand Down Expand Up @@ -38,10 +37,3 @@ await vs.addVectors(
);

assert((await vs.similaritySearchVectorWithScore([0, 0, 1], 1)).length === 1);

// Test CSVLoader
const loader = new CSVLoader(new Blob(["a,b,c\n1,2,3\n4,5,6"]));

const docs = await loader.load();

assert(docs.length === 2);
8 changes: 0 additions & 8 deletions environment_tests/test-exports-cjs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { ChatPromptTemplate } from "@langchain/core/prompts";
import { HNSWLib } from "@langchain/community/vectorstores/hnswlib";
import { HuggingFaceTransformersEmbeddings } from "@langchain/community/embeddings/hf_transformers";
import { Document } from "@langchain/core/documents";
import { CSVLoader } from "@langchain/community/document_loaders/fs/csv";

async function test(useAzure: boolean = false) {
// Test exports
Expand Down Expand Up @@ -48,13 +47,6 @@ async function test(useAzure: boolean = false) {
);

assert((await vs.similaritySearchVectorWithScore([0, 0, 1], 1)).length === 1);

// Test CSVLoader
const loader = new CSVLoader(new Blob(["a,b,c\n1,2,3\n4,5,6"]));

const docs = await loader.load();

assert(docs.length === 2);
}

test(false)
Expand Down
8 changes: 0 additions & 8 deletions environment_tests/test-exports-cjs/src/require.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const { ChatPromptTemplate } = require("@langchain/core/prompts");
const { HNSWLib } = require("@langchain/community/vectorstores/hnswlib");
const { HuggingFaceTransformersEmbeddings } = require("@langchain/community/embeddings/hf_transformers");
const { Document } = require("@langchain/core/documents");
const { CSVLoader } = require("@langchain/community/document_loaders/fs/csv");

async function test() {
// Test exports
Expand Down Expand Up @@ -39,13 +38,6 @@ async function test() {
);

assert((await vs.similaritySearchVectorWithScore([0, 0, 1], 1)).length === 1);

// Test CSVLoader
const loader = new CSVLoader(new Blob(["a,b,c\n1,2,3\n4,5,6"]));

const docs = await loader.load();

assert(docs.length === 2);
}

test()
Expand Down
1 change: 0 additions & 1 deletion environment_tests/test-exports-esm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"@langchain/openai": "workspace:*",
"@tsconfig/recommended": "^1.0.2",
"@xenova/transformers": "^2.17.2",
"d3-dsv": "2",
"hnswlib-node": "^3.0.0",
"langchain": "workspace:*",
"typescript": "^5.0.0"
Expand Down
8 changes: 0 additions & 8 deletions environment_tests/test-exports-esm/src/import.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ async function test() {
const { HNSWLib } = await import("@langchain/community/vectorstores/hnswlib");
const { HuggingFaceTransformersEmbeddings } = await import("@langchain/community/embeddings/hf_transformers");
const { Document } = await import("@langchain/core/documents");
const { CSVLoader } = await import("@langchain/community/document_loaders/fs/csv");

// Test exports
assert(typeof OpenAI === "function");
Expand Down Expand Up @@ -39,13 +38,6 @@ async function test() {
);

assert((await vs.similaritySearchVectorWithScore([0, 0, 1], 1)).length === 1);

// Test CSVLoader
const loader = new CSVLoader(new Blob(["a,b,c\n1,2,3\n4,5,6"]));

const docs = await loader.load();

assert(docs.length === 2);
}

test()
Expand Down
8 changes: 0 additions & 8 deletions environment_tests/test-exports-esm/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { ChatPromptTemplate } from "@langchain/core/prompts";
import { HNSWLib } from "@langchain/community/vectorstores/hnswlib";
import { HuggingFaceTransformersEmbeddings } from "@langchain/community/embeddings/hf_transformers";
import { Document } from "@langchain/core/documents";
import { CSVLoader } from "@langchain/community/document_loaders/fs/csv";
import { CallbackManager } from "@langchain/core/callbacks/manager";

// Test exports
Expand Down Expand Up @@ -41,10 +40,3 @@ await vs.addVectors(
);

assert((await vs.similaritySearchVectorWithScore([0, 0, 1], 1)).length === 1);

// Test CSVLoader
const loader = new CSVLoader(new Blob(["a,b,c\n1,2,3\n4,5,6"]));

const docs = await loader.load();

assert(docs.length === 2);
8 changes: 0 additions & 8 deletions environment_tests/test-exports-esm/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { ChatPromptTemplate } from "@langchain/core/prompts";
import { HNSWLib } from "@langchain/community/vectorstores/hnswlib";
import { HuggingFaceTransformersEmbeddings } from "@langchain/community/embeddings/hf_transformers";
import { Document } from "@langchain/core/documents";
import { CSVLoader } from "@langchain/community/document_loaders/fs/csv";

async function test(useAzure: boolean = false) {
// Test exports
Expand Down Expand Up @@ -49,13 +48,6 @@ async function test(useAzure: boolean = false) {
);

assert((await vs.similaritySearchVectorWithScore([0, 0, 1], 1)).length === 1);

// Test CSVLoader
const loader = new CSVLoader(new Blob(["a,b,c\n1,2,3\n4,5,6"]));

const docs = await loader.load();

assert(docs.length === 2);
}

test(false)
Expand Down
8 changes: 0 additions & 8 deletions environment_tests/test-exports-esm/src/require.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const { ChatPromptTemplate } = require("@langchain/core/prompts");
const { HNSWLib } = require("@langchain/community/vectorstores/hnswlib");
const { HuggingFaceTransformersEmbeddings } = require("@langchain/community/embeddings/hf_transformers");
const { Document } = require("@langchain/core/documents");
const { CSVLoader } = require("@langchain/community/document_loaders/fs/csv");

async function test() {
// Test exports
Expand Down Expand Up @@ -39,13 +38,6 @@ async function test() {
);

assert((await vs.similaritySearchVectorWithScore([0, 0, 1], 1)).length === 1);

// Test CSVLoader
const loader = new CSVLoader(new Blob(["a,b,c\n1,2,3\n4,5,6"]));

const docs = await loader.load();

assert(docs.length === 2);
}

test()
Expand Down

0 comments on commit 7fbae88

Please sign in to comment.