Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix debug log lines issue #174

Merged
merged 4 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/embedjs-interfaces/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@llm-tools/embedjs-interfaces",
"version": "0.1.19",
"version": "0.1.20",
"description": "Interfaces for extending the embedjs ecosystem",
"dependencies": {
"@langchain/core": "^0.3.18",
Expand Down
4 changes: 2 additions & 2 deletions core/embedjs-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@llm-tools/embedjs-utils",
"version": "0.1.19",
"version": "0.1.20",
"description": "Useful util functions when extending the embedjs ecosystem",
"dependencies": {
"@llm-tools/embedjs-interfaces": "0.1.19"
"@llm-tools/embedjs-interfaces": "0.1.20"
},
"type": "module",
"main": "./src/index.js",
Expand Down
6 changes: 3 additions & 3 deletions core/embedjs/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"type": "module",
"name": "@llm-tools/embedjs",
"version": "0.1.19",
"version": "0.1.20",
"description": "A NodeJS RAG framework to easily work with LLMs and custom datasets",
"dependencies": {
"@langchain/textsplitters": "^0.1.0",
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-utils": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"@llm-tools/embedjs-utils": "0.1.20",
"debug": "^4.3.7",
"langchain": "^0.3.6",
"md5": "^2.3.0",
Expand Down
4 changes: 2 additions & 2 deletions databases/embedjs-astra/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@llm-tools/embedjs-astradb",
"version": "0.1.19",
"version": "0.1.20",
"description": "Add AstraDB support to embedjs",
"dependencies": {
"@datastax/astra-db-ts": "^1.5.0",
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"debug": "^4.3.7"
},
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions databases/embedjs-cosmos/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@llm-tools/embedjs-cosmos",
"version": "0.1.19",
"version": "0.1.20",
"description": "Add CosmosDB support to embedjs",
"dependencies": {
"@azure/cosmos": "^4.2.0",
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"debug": "^4.3.7"
},
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions databases/embedjs-hnswlib/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@llm-tools/embedjs-hnswlib",
"version": "0.1.19",
"version": "0.1.20",
"description": "Add HNSWLib support to embedjs",
"dependencies": {
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"debug": "^4.3.7",
"hnswlib-node": "^3.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions databases/embedjs-lancedb/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@llm-tools/embedjs-lancedb",
"version": "0.1.19",
"version": "0.1.20",
"description": "Add LanceDb support to embedjs",
"dependencies": {
"@lancedb/lancedb": "^0.13.0",
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"compute-cosine-similarity": "^1.1.0",
"debug": "^4.3.7"
},
Expand Down
6 changes: 3 additions & 3 deletions databases/embedjs-lancedb/src/lance-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class LanceDb implements BaseVectorDatabase {
const client = await connect(dir);

const list = await client.tableNames();
this.debug.log(`Table names found - [${list.join(',')}]`);
this.debug(`Table names found - [${list.join(',')}]`);
if (list.indexOf(LanceDb.STATIC_DB_NAME) > -1) this.table = await client.openTable(LanceDb.STATIC_DB_NAME);
else {
//TODO: You can add a proper schema instead of a sample record now but it requires another package apache-arrow; another install on downstream as well
Expand Down Expand Up @@ -61,14 +61,14 @@ export class LanceDb implements BaseVectorDatabase {
};
});

this.debug.log(`Executing insert of ${mapped.length} entries`);
this.debug(`Executing insert of ${mapped.length} entries`);
await this.table.add(mapped);
return mapped.length; //TODO: check if vectorDb has addressed the issue where add returns undefined
}

async similaritySearch(query: number[], k: number): Promise<ExtractChunkData[]> {
const results = await this.table.search(query).limit(k).toArray();
this.debug.log(`Query found ${results.length} entries`);
this.debug(`Query found ${results.length} entries`);

return (
results
Expand Down
4 changes: 2 additions & 2 deletions databases/embedjs-libsql/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@llm-tools/embedjs-libsql",
"version": "0.1.19",
"version": "0.1.20",
"description": "Add LibSQL support to embedjs",
"dependencies": {
"@libsql/client": "^0.14.0",
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"debug": "^4.3.7"
},
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions databases/embedjs-libsql/src/libsql-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class LibSqlDb implements BaseVectorDatabase {
${values.join(',')}
);`;

this.debug.log(`Executing statement - ${statement}`);
this.debug(`Executing statement - ${statement}`);
const result = await this.client.execute(statement);
return result.rowsAffected;
}
Expand All @@ -51,7 +51,7 @@ export class LibSqlDb implements BaseVectorDatabase {
TOP ${k}
ASC;`;

this.debug.log(`Executing statement - ${statement}`);
this.debug(`Executing statement - ${statement}`);
const results = await this.client.execute(statement);

return results.rows.map((result) => {
Expand Down
4 changes: 2 additions & 2 deletions databases/embedjs-lmdb/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@llm-tools/embedjs-lmdb",
"version": "0.1.19",
"version": "0.1.20",
"description": "Add LMDB support to embedjs",
"dependencies": {
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"debug": "^4.3.7",
"lmdb": "^3.1.6"
},
Expand Down
2 changes: 1 addition & 1 deletion databases/embedjs-lmdb/src/lmdb-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class LmdbStore implements BaseStore {
}

async init(): Promise<void> {
this.debug.log(`Opening LMDB connection with path - ${this.dataPath}`);
this.debug(`Opening LMDB connection with path - ${this.dataPath}`);
this.database = lmdb.open({
path: this.dataPath,
compression: true,
Expand Down
4 changes: 2 additions & 2 deletions databases/embedjs-mongodb/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@llm-tools/embedjs-mongodb",
"version": "0.1.19",
"version": "0.1.20",
"description": "Add MongoDB support to embedjs",
"dependencies": {
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"debug": "^4.3.7",
"mongodb": "^6.10.0"
},
Expand Down
4 changes: 2 additions & 2 deletions databases/embedjs-pinecone/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@llm-tools/embedjs-pinecone",
"version": "0.1.19",
"version": "0.1.20",
"description": "Add Pinecone support to embedjs",
"dependencies": {
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"@pinecone-database/pinecone": "^4.0.0",
"debug": "^4.3.7"
},
Expand Down
4 changes: 2 additions & 2 deletions databases/embedjs-qdrant/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@llm-tools/embedjs-qdrant",
"version": "0.1.19",
"version": "0.1.20",
"description": "Add Qdrant support to embedjs",
"dependencies": {
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"@qdrant/js-client-rest": "^1.12.0",
"debug": "^4.3.7",
"uuid": "^11.0.3"
Expand Down
4 changes: 2 additions & 2 deletions databases/embedjs-redis/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@llm-tools/embedjs-redis",
"version": "0.1.19",
"version": "0.1.20",
"description": "Add Redis support to embedjs",
"dependencies": {
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"ioredis": "^5.4.1"
},
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions databases/embedjs-weaviate/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@llm-tools/embedjs-weaviate",
"version": "0.1.19",
"version": "0.1.20",
"description": "Add Weaviate support to embedjs",
"dependencies": {
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"compute-cosine-similarity": "^1.1.0",
"debug": "^4.3.7",
"weaviate-ts-client": "^2.2.0"
Expand Down
6 changes: 3 additions & 3 deletions loaders/embedjs-loader-confluence/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@llm-tools/embedjs-loader-confluence",
"version": "0.1.19",
"version": "0.1.20",
"description": "Confluence loader for embedjs",
"dependencies": {
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-loader-web": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"@llm-tools/embedjs-loader-web": "0.1.20",
"confluence.js": "^1.7.4",
"debug": "^4.3.7",
"md5": "^2.3.0"
Expand Down
6 changes: 3 additions & 3 deletions loaders/embedjs-loader-csv/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@llm-tools/embedjs-loader-csv",
"version": "0.1.19",
"version": "0.1.20",
"description": "CSV loader for embedjs",
"dependencies": {
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-utils": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"@llm-tools/embedjs-utils": "0.1.20",
"csv-parse": "^5.6.0",
"debug": "^4.3.7",
"md5": "^2.3.0"
Expand Down
6 changes: 3 additions & 3 deletions loaders/embedjs-loader-markdown/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@llm-tools/embedjs-loader-markdown",
"version": "0.1.19",
"version": "0.1.20",
"description": "XML loader for embedjs",
"dependencies": {
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-loader-web": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"@llm-tools/embedjs-loader-web": "0.1.20",
"debug": "^4.3.7",
"md5": "^2.3.0",
"micromark": "^4.0.1",
Expand Down
6 changes: 3 additions & 3 deletions loaders/embedjs-loader-msoffice/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@llm-tools/embedjs-loader-msoffice",
"version": "0.1.19",
"version": "0.1.20",
"description": "Word, PPT and Excel loader for embedjs",
"dependencies": {
"@langchain/textsplitters": "^0.1.0",
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-utils": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"@llm-tools/embedjs-utils": "0.1.20",
"md5": "^2.3.0",
"office-text-extractor": "^3.0.3"
},
Expand Down
6 changes: 3 additions & 3 deletions loaders/embedjs-loader-pdf/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@llm-tools/embedjs-loader-pdf",
"version": "0.1.19",
"version": "0.1.20",
"description": "PDF loader for embedjs",
"dependencies": {
"@langchain/textsplitters": "^0.1.0",
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-utils": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"@llm-tools/embedjs-utils": "0.1.20",
"md5": "^2.3.0",
"office-text-extractor": "^3.0.3"
},
Expand Down
6 changes: 3 additions & 3 deletions loaders/embedjs-loader-sitemap/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@llm-tools/embedjs-loader-sitemap",
"version": "0.1.19",
"version": "0.1.20",
"description": "Sitemap recursive loader for embedjs",
"dependencies": {
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-loader-web": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"@llm-tools/embedjs-loader-web": "0.1.20",
"debug": "^4.3.7",
"md5": "^2.3.0",
"sitemapper": "^3.2.18"
Expand Down
6 changes: 3 additions & 3 deletions loaders/embedjs-loader-web/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@llm-tools/embedjs-loader-web",
"version": "0.1.19",
"version": "0.1.20",
"description": "Web page loader for embedjs",
"dependencies": {
"@langchain/textsplitters": "^0.1.0",
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-utils": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"@llm-tools/embedjs-utils": "0.1.20",
"debug": "^4.3.7",
"html-to-text": "^9.0.5",
"md5": "^2.3.0"
Expand Down
4 changes: 2 additions & 2 deletions loaders/embedjs-loader-xml/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@llm-tools/embedjs-loader-xml",
"version": "0.1.19",
"version": "0.1.20",
"description": "XML loader for embedjs",
"dependencies": {
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"debug": "^4.3.7",
"fast-xml-parser": "^4.5.0",
"md5": "^2.3.0"
Expand Down
6 changes: 3 additions & 3 deletions loaders/embedjs-loader-youtube/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@llm-tools/embedjs-loader-youtube",
"version": "0.1.19",
"version": "0.1.20",
"description": "Youtube transcript and channel recursive loader for embedjs",
"dependencies": {
"@langchain/textsplitters": "^0.1.0",
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-utils": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"@llm-tools/embedjs-utils": "0.1.20",
"debug": "^4.3.7",
"md5": "^2.3.0",
"usetube": "^2.2.7",
Expand Down
4 changes: 2 additions & 2 deletions models/embedjs-anthropic/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@llm-tools/embedjs-anthropic",
"version": "0.1.19",
"version": "0.1.20",
"description": "Enable usage of Anthropic models with embedjs",
"dependencies": {
"@langchain/anthropic": "^0.3.8",
"@langchain/core": "^0.3.18",
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"debug": "^4.3.7"
},
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions models/embedjs-cohere/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@llm-tools/embedjs-cohere",
"version": "0.1.19",
"version": "0.1.20",
"description": "Enable usage of Cohere models with embedjs",
"dependencies": {
"@langchain/cohere": "^0.3.1",
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"cohere-ai": "^7.14.0"
},
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions models/embedjs-huggingface/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@llm-tools/embedjs-huggingface",
"version": "0.1.19",
"version": "0.1.20",
"description": "Enable usage of HuggingFace models with embedjs",
"dependencies": {
"@huggingface/inference": "^2.8.1",
"@langchain/community": "^0.3.15",
"@langchain/core": "^0.3.18",
"@llm-tools/embedjs-interfaces": "0.1.19",
"@llm-tools/embedjs-interfaces": "0.1.20",
"debug": "^4.3.7"
},
"type": "module",
Expand Down
Loading
Loading