From f799fd484a1e29cc7ec65f140034f781d580439e Mon Sep 17 00:00:00 2001 From: Ahmad Bilal Date: Mon, 2 Dec 2024 19:20:59 +0500 Subject: [PATCH 01/12] =?UTF-8?q?=F0=9F=93=A6=20NEW:=20Batch=20upload=20do?= =?UTF-8?q?cuments=20to=20memory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/baseai/src/deploy/index.ts | 50 ++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/packages/baseai/src/deploy/index.ts b/packages/baseai/src/deploy/index.ts index 8e2a64ba..3c13085f 100644 --- a/packages/baseai/src/deploy/index.ts +++ b/packages/baseai/src/deploy/index.ts @@ -643,24 +643,42 @@ export async function uploadDocumentsToMemory({ name: string; account: Account; }) { - for (const doc of documents) { - try { - p.log.message(`Uploading document: ${doc.name} ....`); - await new Promise(resolve => setTimeout(resolve, 800)); // To avoid rate limiting - const signedUrl = await getSignedUploadUrl({ - documentName: doc.name, - memoryName: name, - account, - meta: doc.meta - }); + const BATCH_SIZE = 5; // Number of concurrent uploads + const RATE_LIMIT_DELAY = 1000; // 1 second delay between requests + + // Process documents in batches to avoid rate limiting + for (let i = 0; i < documents.length; i += BATCH_SIZE) { + const batch = documents.slice(i, i + BATCH_SIZE); + + const batchUploadPromises = batch.map(async (doc, index) => { + try { + // Stagger requests within batch + await new Promise(resolve => + setTimeout(resolve, index * RATE_LIMIT_DELAY) + ); + + // p.log.message(`Uploading document: ${doc.name} ....`); + const signedUrl = await getSignedUploadUrl({ + documentName: doc.name, + memoryName: name, + account + }); - const uploadResponse = await uploadDocument(signedUrl, doc.blob); - dlog(`Upload response status: ${uploadResponse.status}`); + const uploadResponse = await uploadDocument( + signedUrl, + doc.blob + ); + dlog(`Upload response status: ${uploadResponse.status}`); - p.log.message(`Uploaded document: ${doc.name}`); - } catch (error) { - throw error; - } + p.log.message(`Uploaded document: ${doc.name}`); + } catch (error: any) { + throw new Error( + `Failed to upload ${doc.name}: ${error.message ?? error}` + ); + } + }); + + await Promise.all(batchUploadPromises); } } From 13b620cf5490e6ad81b8d6068936577bdf611563 Mon Sep 17 00:00:00 2001 From: Ahmad Bilal Date: Mon, 2 Dec 2024 19:21:33 +0500 Subject: [PATCH 02/12] =?UTF-8?q?=F0=9F=93=A6=20NEW:=20Batch=20delete=20do?= =?UTF-8?q?cuments=20from=20memory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/baseai/src/deploy/index.ts | 87 +++++++++++++---------------- 1 file changed, 40 insertions(+), 47 deletions(-) diff --git a/packages/baseai/src/deploy/index.ts b/packages/baseai/src/deploy/index.ts index 3c13085f..c0bbbbc2 100644 --- a/packages/baseai/src/deploy/index.ts +++ b/packages/baseai/src/deploy/index.ts @@ -642,74 +642,67 @@ export async function uploadDocumentsToMemory({ documents: MemoryDocumentI[]; name: string; account: Account; +}) { + for (const doc of documents) { + try { + p.log.message(`Uploading document: ${doc.name} ....`); + await new Promise(resolve => setTimeout(resolve, 800)); // To avoid rate limiting + const signedUrl = await getSignedUploadUrl({ + documentName: doc.name, + memoryName: name, + account + }); + + const uploadResponse = await uploadDocument(signedUrl, doc.blob); + dlog(`Upload response status: ${uploadResponse.status}`); + + p.log.message(`Uploaded document: ${doc.name}`); + } catch (error) { + throw error; + } + } +} + +export async function deleteDocumentsFromMemory({ + documents, + name, + account +}: { + documents: string[]; + name: string; + account: Account; }) { const BATCH_SIZE = 5; // Number of concurrent uploads const RATE_LIMIT_DELAY = 1000; // 1 second delay between requests - // Process documents in batches to avoid rate limiting + p.log.info(`Deleting ${documents.length} documents from memory: ${name}`); + for (let i = 0; i < documents.length; i += BATCH_SIZE) { const batch = documents.slice(i, i + BATCH_SIZE); - - const batchUploadPromises = batch.map(async (doc, index) => { + const batchPromises = batch.map(async (doc, index) => { try { - // Stagger requests within batch await new Promise(resolve => setTimeout(resolve, index * RATE_LIMIT_DELAY) ); - // p.log.message(`Uploading document: ${doc.name} ....`); - const signedUrl = await getSignedUploadUrl({ - documentName: doc.name, + // p.log.message(`Deleting document: ${doc}`); + const deleteResponse = await deleteDocument({ + documentName: doc, memoryName: name, account }); - const uploadResponse = await uploadDocument( - signedUrl, - doc.blob - ); - dlog(`Upload response status: ${uploadResponse.status}`); - - p.log.message(`Uploaded document: ${doc.name}`); + dlog(`Delete response status: ${deleteResponse.status}`); + p.log.message(`Deleted document: ${doc}`); + return deleteResponse; } catch (error: any) { throw new Error( - `Failed to upload ${doc.name}: ${error.message ?? error}` + `Failed to delete ${doc}: ${error.message ?? error}` ); } }); - await Promise.all(batchUploadPromises); - } -} - -export async function deleteDocumentsFromMemory({ - documents, - name, - account -}: { - documents: string[]; - name: string; - account: Account; -}) { - p.log.info(`Deleting documents from memory: ${name}`); - - for (const doc of documents) { - try { - p.log.message(`Deleting document: ${doc} ....`); - await new Promise(resolve => setTimeout(resolve, 800)); // To avoid rate limiting - - const deleteResponse = await deleteDocument({ - documentName: doc, - memoryName: name, - account - }); - - dlog(`Delete response status: ${deleteResponse.status}`); - - p.log.message(`Deleted document: ${doc}`); - } catch (error) { - throw error; - } + await Promise.all(batchPromises); } p.log.info(`Deleted documents from memory: ${name}`); } From bfaafeadb67fbed868289ccb6cd15a7edf86b0d1 Mon Sep 17 00:00:00 2001 From: Ahmad Bilal Date: Mon, 2 Dec 2024 19:22:15 +0500 Subject: [PATCH 03/12] =?UTF-8?q?=F0=9F=91=8C=20IMPROVE:=20Rate=20limit=20?= =?UTF-8?q?and=20batch=20handling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/baseai/src/deploy/index.ts | 49 ++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/packages/baseai/src/deploy/index.ts b/packages/baseai/src/deploy/index.ts index c0bbbbc2..06eb449a 100644 --- a/packages/baseai/src/deploy/index.ts +++ b/packages/baseai/src/deploy/index.ts @@ -643,23 +643,42 @@ export async function uploadDocumentsToMemory({ name: string; account: Account; }) { - for (const doc of documents) { - try { - p.log.message(`Uploading document: ${doc.name} ....`); - await new Promise(resolve => setTimeout(resolve, 800)); // To avoid rate limiting - const signedUrl = await getSignedUploadUrl({ - documentName: doc.name, - memoryName: name, - account - }); + const BATCH_SIZE = 5; // Number of concurrent uploads + const RATE_LIMIT_DELAY = 1000; // 1 second delay between requests - const uploadResponse = await uploadDocument(signedUrl, doc.blob); - dlog(`Upload response status: ${uploadResponse.status}`); + // Process documents in batches to avoid rate limiting + for (let i = 0; i < documents.length; i += BATCH_SIZE) { + const batch = documents.slice(i, i + BATCH_SIZE); - p.log.message(`Uploaded document: ${doc.name}`); - } catch (error) { - throw error; - } + const batchUploadPromises = batch.map(async (doc, index) => { + try { + // Stagger requests within batch + await new Promise(resolve => + setTimeout(resolve, index * RATE_LIMIT_DELAY) + ); + + // p.log.message(`Uploading document: ${doc.name} ....`); + const signedUrl = await getSignedUploadUrl({ + documentName: doc.name, + memoryName: name, + account + }); + + const uploadResponse = await uploadDocument( + signedUrl, + doc.blob + ); + dlog(`Upload response status: ${uploadResponse.status}`); + + p.log.message(`Uploaded document: ${doc.name}`); + } catch (error: any) { + throw new Error( + `Failed to upload ${doc.name}: ${error.message ?? error}` + ); + } + }); + + await Promise.all(batchUploadPromises); } } From ebd88574b88508772ee143ebb8cd61112e07b755 Mon Sep 17 00:00:00 2001 From: Ahmad Bilal Date: Mon, 2 Dec 2024 19:27:25 +0500 Subject: [PATCH 04/12] =?UTF-8?q?=F0=9F=93=A6=20NEW:=20Delete=20docs=20bef?= =?UTF-8?q?ore=20deploying?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/baseai/src/deploy/index.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/baseai/src/deploy/index.ts b/packages/baseai/src/deploy/index.ts index 06eb449a..7e439572 100644 --- a/packages/baseai/src/deploy/index.ts +++ b/packages/baseai/src/deploy/index.ts @@ -577,12 +577,6 @@ export async function upsertMemory({ p.log.info( `Memory "${memory.name}" already exists. Updating changed documents.` ); - await handleGitSyncMemoryDeploy({ - memory, - account, - documents, - overwrite - }); if (docsToDelete?.length > 0) { await deleteDocumentsFromMemory({ @@ -592,6 +586,13 @@ export async function upsertMemory({ }); } + await handleGitSyncMemoryDeploy({ + memory, + account, + documents, + overwrite + }); + await updateDeployedCommitHash(memory.name); p.log.info( From 099b8b2490d1ec34d5dcc72865edc4e6709ece04 Mon Sep 17 00:00:00 2001 From: Ahmad Bilal Date: Mon, 2 Dec 2024 20:38:29 +0500 Subject: [PATCH 05/12] =?UTF-8?q?=F0=9F=91=8C=20IMPROVE:=20Optimize=20late?= =?UTF-8?q?ncy=20by=20fetching=20common=20data=20once?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/baseai/src/deploy/document.ts | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/baseai/src/deploy/document.ts b/packages/baseai/src/deploy/document.ts index 484adbca..5c777d0c 100644 --- a/packages/baseai/src/deploy/document.ts +++ b/packages/baseai/src/deploy/document.ts @@ -114,11 +114,18 @@ async function deployDocument({ process.exit(1); } + // Fetch the existing documents + const prodDocs = await listMemoryDocuments({ + account, + memoryName + }); + await handleSingleDocDeploy({ memory: memoryObject, account, document, - overwrite + overwrite, + prodDocs }); spinner.stop( @@ -139,23 +146,19 @@ export async function handleSingleDocDeploy({ memory, account, document, - overwrite + overwrite, + prodDocs }: { memory: MemoryI; account: Account; document: MemoryDocumentI; overwrite: boolean; + prodDocs: string[]; }) { p.log.info( `Checking "${memory.name}" memory for document "${document.name}".` ); - // Fetch the existing documents - const prodDocs = await listMemoryDocuments({ - account, - memoryName: memory.name - }); - // If overwrite is present, deploy. if (overwrite) { await uploadDocumentsToMemory({ From 48de7b6d9a3db744cb1a659d6b2132a1d6f563f8 Mon Sep 17 00:00:00 2001 From: Ahmad Bilal Date: Mon, 2 Dec 2024 20:39:33 +0500 Subject: [PATCH 06/12] =?UTF-8?q?=F0=9F=93=A6=20NEW:=20Batch=20upload=20gi?= =?UTF-8?q?t=20memory=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/baseai/src/deploy/index.ts | 32 ++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/packages/baseai/src/deploy/index.ts b/packages/baseai/src/deploy/index.ts index 7e439572..3aa4ad1a 100644 --- a/packages/baseai/src/deploy/index.ts +++ b/packages/baseai/src/deploy/index.ts @@ -1122,14 +1122,32 @@ export async function handleGitSyncMemoryDeploy({ documents: MemoryDocumentI[]; overwrite: boolean; }) { - for (const doc in documents) { - await new Promise(resolve => setTimeout(resolve, 800)); // To avoid rate limiting - await handleSingleDocDeploy({ - memory, - account, - document: documents[doc], - overwrite: true // TODO: Implement overwrite for git-sync memories + const BATCH_SIZE = 5; + const RATE_LIMIT_DELAY = 1000; + + // Fetch existing documents once + const prodDocs = await listMemoryDocuments({ + account, + memoryName: memory.name + }); + + // Process in batches + for (let i = 0; i < documents.length; i += BATCH_SIZE) { + const batch = documents.slice(i, i + BATCH_SIZE); + const batchPromises = batch.map(async (doc, index) => { + await new Promise(resolve => + setTimeout(resolve, index * RATE_LIMIT_DELAY) + ); + return handleSingleDocDeploy({ + memory, + account, + document: doc, + overwrite: true, + prodDocs + }); }); + + await Promise.all(batchPromises); } } From e3a6936349f89eda9b8e0cfcfaa68320a5b4cf85 Mon Sep 17 00:00:00 2001 From: Ahmad Bilal Date: Fri, 13 Dec 2024 20:20:00 +0500 Subject: [PATCH 07/12] =?UTF-8?q?=F0=9F=91=8C=20IMPROVE:=20Rate=20limit=20?= =?UTF-8?q?handling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/baseai/src/deploy/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/baseai/src/deploy/index.ts b/packages/baseai/src/deploy/index.ts index 3aa4ad1a..abfda126 100644 --- a/packages/baseai/src/deploy/index.ts +++ b/packages/baseai/src/deploy/index.ts @@ -645,7 +645,7 @@ export async function uploadDocumentsToMemory({ account: Account; }) { const BATCH_SIZE = 5; // Number of concurrent uploads - const RATE_LIMIT_DELAY = 1000; // 1 second delay between requests + const RATE_LIMIT_DELAY = 1500; // 1.5 second delay between requests // Process documents in batches to avoid rate limiting for (let i = 0; i < documents.length; i += BATCH_SIZE) { @@ -693,7 +693,7 @@ export async function deleteDocumentsFromMemory({ account: Account; }) { const BATCH_SIZE = 5; // Number of concurrent uploads - const RATE_LIMIT_DELAY = 1000; // 1 second delay between requests + const RATE_LIMIT_DELAY = 1500; // 1.5 second delay between requests p.log.info(`Deleting ${documents.length} documents from memory: ${name}`); @@ -1123,7 +1123,7 @@ export async function handleGitSyncMemoryDeploy({ overwrite: boolean; }) { const BATCH_SIZE = 5; - const RATE_LIMIT_DELAY = 1000; + const RATE_LIMIT_DELAY = 1500; // Fetch existing documents once const prodDocs = await listMemoryDocuments({ From b1e82f62fa24a7d9479ac6d208304ba2742bd90d Mon Sep 17 00:00:00 2001 From: Ahmad Bilal Date: Fri, 13 Dec 2024 20:34:59 +0500 Subject: [PATCH 08/12] =?UTF-8?q?=F0=9F=90=9B=20FIX:=20Meta=20support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/baseai/src/deploy/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/baseai/src/deploy/index.ts b/packages/baseai/src/deploy/index.ts index abfda126..718aca20 100644 --- a/packages/baseai/src/deploy/index.ts +++ b/packages/baseai/src/deploy/index.ts @@ -662,7 +662,8 @@ export async function uploadDocumentsToMemory({ const signedUrl = await getSignedUploadUrl({ documentName: doc.name, memoryName: name, - account + account, + meta: doc.meta }); const uploadResponse = await uploadDocument( From 7598f51a6081122414db16b241859e7bfd62a1a9 Mon Sep 17 00:00:00 2001 From: Ahmad Bilal Date: Fri, 13 Dec 2024 21:10:29 +0500 Subject: [PATCH 09/12] =?UTF-8?q?=F0=9F=93=A6=20NEW:=20snapshot=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/baseai/package.json | 228 ++++++++++++++++----------------- packages/core/package.json | 240 +++++++++++++++++------------------ 2 files changed, 234 insertions(+), 234 deletions(-) diff --git a/packages/baseai/package.json b/packages/baseai/package.json index f31fb54a..ce0f1610 100644 --- a/packages/baseai/package.json +++ b/packages/baseai/package.json @@ -1,116 +1,116 @@ { - "name": "baseai", - "description": "The Web AI Framework Dev - BaseAI.dev", - "version": "0.9.41", - "license": "UNLICENSED", - "type": "module", - "main": "./dist/index.js", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", - "bin": { - "baseai": "bin/baseai.js" - }, - "author": { - "name": "Langbase", - "url": "https://BaseAI.dev" - }, - "repository": { - "type": "git", - "url": "https://github.com/LangbaseInc/baseai.git", - "directory": "packages/cli" - }, - "bugs": { - "url": "https://github.com/LangbaseInc/baseai/issues" - }, - "homepage": "https://BaseAI.dev", - "files": [ - "dist/**" - ], - "scripts": { - "build": "tsup", - "dev": "tsup --watch", - "lint": "eslint \"src/**/*.ts*\"", - "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist", - "type-check": "tsc --noEmit", - "prettier-check": "prettier --check \"./**/*.ts*\"", - "test": "pnpm test:node && pnpm test:edge", - "#test": "pnpm test:node && pnpm test:edge && pnpm test:ui && pnpm test:e2e", - "test:edge": "vitest --config vitest.edge.config.js --run", - "test:node": "vitest --config vitest.node.config.js --run", - "test:ui": "pnpm test:ui:react", - "test:ui:react": "vitest --config vitest.ui.react.config.js --run", - "test:e2e": "playwright test", - "test:edge:watch": "vitest --config vitest.edge.config.js", - "test:node:watch": "vitest --config vitest.node.config.js", - "test:ui:react:watch": "vitest --config vitest.ui.react.config.js" - }, - "dependencies": { - "@antfu/ni": "^0.23.0", - "@clack/core": "^0.3.4", - "@clack/prompts": "^0.7.0", - "@hono/node-server": "^1.13.1", - "@hono/zod-openapi": "^0.16.0", - "@sindresorhus/slugify": "^2.2.1", - "camelcase": "^8.0.0", - "chalk": "^5.3.0", - "cli-alerts": "^2.0.0", - "cli-handle-error": "^4.4.0", - "cli-handle-unhandled": "^1.1.1", - "cli-meow-help": "^4.0.0", - "cli-table3": "^0.6.5", - "cli-welcome": "^3.0.0", - "compute-cosine-similarity": "^1.1.0", - "cosmiconfig": "^9.0.0", - "cosmiconfig-typescript-loader": "^5.0.0", - "dotenv": "^16.4.5", - "execa": "^9.4.0", - "fast-glob": "^3.3.2", - "figures": "^6.1.0", - "get-package-json-file": "^2.0.0", - "hono": "^4.5.11", - "js-tiktoken": "^1.0.14", - "log-symbols": "^7.0.0", - "lowdb": "^7.0.1", - "meow": "^13.2.0", - "node-fetch": "^3.3.2", - "open": "^10.1.0", - "openai": "^4.63.0", - "p-map": "^7.0.2", - "picocolors": "^1.1.0", - "prettier": "^3.3.3", - "source-map-support": "^0.5.21", - "unpdf": "^0.11.0", - "uuid": "^10.0.0", - "xlsx": "^0.18.5", - "zod": "^3.23.8", - "zod-error": "^1.5.0", - "zod-validation-error": "^3.4.0" - }, - "devDependencies": { - "@baseai/eslint-config": "workspace:*", - "@baseai/tsconfig": "workspace:*", - "@types/node": "^22.6.1", - "tsup": "^8.3.0", - "tsx": "^4.19.1", - "typescript": "^5.6.2", - "vitest": "1.6.0" - }, - "keywords": [ - "baseai", - "base", - "base AI framework", - "BaseAI.dev", - "composable AI", - "AI agents", - "AI multi agents", - "ai", - "llm", - "langbase core", - "langbase sdk", - "baseai", - "base ai", - "langbase", - "langbase.com", - "generative AI" - ] + "name": "baseai", + "description": "The Web AI Framework Dev - BaseAI.dev", + "version": "0.9.42-snapshot.0", + "license": "UNLICENSED", + "type": "module", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "bin": { + "baseai": "bin/baseai.js" + }, + "author": { + "name": "Langbase", + "url": "https://BaseAI.dev" + }, + "repository": { + "type": "git", + "url": "https://github.com/LangbaseInc/baseai.git", + "directory": "packages/cli" + }, + "bugs": { + "url": "https://github.com/LangbaseInc/baseai/issues" + }, + "homepage": "https://BaseAI.dev", + "files": [ + "dist/**" + ], + "scripts": { + "build": "tsup", + "dev": "tsup --watch", + "lint": "eslint \"src/**/*.ts*\"", + "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist", + "type-check": "tsc --noEmit", + "prettier-check": "prettier --check \"./**/*.ts*\"", + "test": "pnpm test:node && pnpm test:edge", + "#test": "pnpm test:node && pnpm test:edge && pnpm test:ui && pnpm test:e2e", + "test:edge": "vitest --config vitest.edge.config.js --run", + "test:node": "vitest --config vitest.node.config.js --run", + "test:ui": "pnpm test:ui:react", + "test:ui:react": "vitest --config vitest.ui.react.config.js --run", + "test:e2e": "playwright test", + "test:edge:watch": "vitest --config vitest.edge.config.js", + "test:node:watch": "vitest --config vitest.node.config.js", + "test:ui:react:watch": "vitest --config vitest.ui.react.config.js" + }, + "dependencies": { + "@antfu/ni": "^0.23.0", + "@clack/core": "^0.3.4", + "@clack/prompts": "^0.7.0", + "@hono/node-server": "^1.13.1", + "@hono/zod-openapi": "^0.16.0", + "@sindresorhus/slugify": "^2.2.1", + "camelcase": "^8.0.0", + "chalk": "^5.3.0", + "cli-alerts": "^2.0.0", + "cli-handle-error": "^4.4.0", + "cli-handle-unhandled": "^1.1.1", + "cli-meow-help": "^4.0.0", + "cli-table3": "^0.6.5", + "cli-welcome": "^3.0.0", + "compute-cosine-similarity": "^1.1.0", + "cosmiconfig": "^9.0.0", + "cosmiconfig-typescript-loader": "^5.0.0", + "dotenv": "^16.4.5", + "execa": "^9.4.0", + "fast-glob": "^3.3.2", + "figures": "^6.1.0", + "get-package-json-file": "^2.0.0", + "hono": "^4.5.11", + "js-tiktoken": "^1.0.14", + "log-symbols": "^7.0.0", + "lowdb": "^7.0.1", + "meow": "^13.2.0", + "node-fetch": "^3.3.2", + "open": "^10.1.0", + "openai": "^4.63.0", + "p-map": "^7.0.2", + "picocolors": "^1.1.0", + "prettier": "^3.3.3", + "source-map-support": "^0.5.21", + "unpdf": "^0.11.0", + "uuid": "^10.0.0", + "xlsx": "^0.18.5", + "zod": "^3.23.8", + "zod-error": "^1.5.0", + "zod-validation-error": "^3.4.0" + }, + "devDependencies": { + "@baseai/eslint-config": "workspace:*", + "@baseai/tsconfig": "workspace:*", + "@types/node": "^22.6.1", + "tsup": "^8.3.0", + "tsx": "^4.19.1", + "typescript": "^5.6.2", + "vitest": "1.6.0" + }, + "keywords": [ + "baseai", + "base", + "base AI framework", + "BaseAI.dev", + "composable AI", + "AI agents", + "AI multi agents", + "ai", + "llm", + "langbase core", + "langbase sdk", + "baseai", + "base ai", + "langbase", + "langbase.com", + "generative AI" + ] } \ No newline at end of file diff --git a/packages/core/package.json b/packages/core/package.json index 108327e2..b37e7158 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,122 +1,122 @@ { - "name": "@baseai/core", - "description": "The Web AI Framework's core - BaseAI.dev", - "version": "0.9.41", - "license": "Apache-2.0", - "sideEffects": false, - "main": "./dist/index.js", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", - "files": [ - "dist/**", - "pipes/dist/**", - "helpers/dist/**", - "react/dist/**", - "CHANGELOG.md" - ], - "scripts": { - "xbuild": "tsup src/index.ts --format esm,cjs --dts --external react", - "build": "tsup", - "dev": "tsup src/index.ts --format esm,cjs --watch --dts --external react", - "xdev": "tsup --watch", - "lint": "eslint \"src/**/*.ts*\"", - "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist", - "type-check": "tsc --noEmit", - "prettier-check": "prettier --check \"./**/*.ts*\"", - "test": "pnpm test:node && pnpm test:edge", - "#test": "pnpm test:node && pnpm test:edge && pnpm test:ui && pnpm test:e2e", - "test:edge": "vitest --config vitest.edge.config.js --run", - "test:node": "vitest --config vitest.node.config.js --run", - "test:ui": "pnpm test:ui:react", - "test:ui:react": "vitest --config vitest.ui.react.config.js --run", - "test:e2e": "playwright test", - "test:edge:watch": "vitest --config vitest.edge.config.js", - "test:node:watch": "vitest --config vitest.node.config.js", - "test:ui:react:watch": "vitest --config vitest.ui.react.config.js" - }, - "dependencies": { - "openai": "^4.63.0", - "zod": "^3.23.8" - }, - "devDependencies": { - "@baseai/eslint-config": "workspace:*", - "@baseai/tsconfig": "workspace:*", - "@edge-runtime/vm": "^4.0.3", - "@playwright/test": "^1.47.2", - "@testing-library/react": "^16.0.1", - "@types/node": "^22.6.1", - "@types/react": "^18.3.9", - "@vitejs/plugin-react": "^4.3.1", - "eslint": "^8.57.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-prettier": "^5.2.1", - "jsdom": "^25.0.1", - "react": "^18", - "tsup": "^8.3.0", - "typescript": "^5.6.2", - "vitest": "1.6.0" - }, - "publishConfig": { - "access": "public" - }, - "exports": { - ".": { - "types": "./dist/index.d.ts", - "require": "./dist/index.js", - "import": "./dist/index.mjs" - }, - "./react": { - "types": "./react/dist/index.d.ts", - "require": "./react/dist/index.js", - "import": "./react/dist/index.mjs" - }, - "./pipes": { - "types": "./pipes/dist/index.d.ts", - "require": "./pipes/dist/index.js", - "import": "./pipes/dist/index.mjs" - }, - "./helpers": { - "types": "./helpers/dist/index.d.ts", - "require": "./helpers/dist/index.js", - "import": "./helpers/dist/index.mjs" - } - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "react": "^18 || ^19", - "zod": "^3.0.0" - }, - "peerDependenciesMeta": { - "react": { - "optional": true - }, - "zod": { - "optional": true - } - }, - "homepage": "https://BaseAI.dev", - "repository": { - "type": "git", - "url": "git+https://github.com/LangbaseInc/baseai.git" - }, - "bugs": { - "url": "https://github.com/LangbaseInc/baseai/issues" - }, - "author": { - "name": "Langbase", - "url": "https://BaseAI.dev" - }, - "keywords": [ - "ai", - "llm", - "langbase core", - "langbase sdk", - "baseai", - "base ai", - "langbase", - "langbase.com", - "generative AI" - ] + "name": "@baseai/core", + "description": "The Web AI Framework's core - BaseAI.dev", + "version": "0.9.42-snapshot.0", + "license": "Apache-2.0", + "sideEffects": false, + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "files": [ + "dist/**", + "pipes/dist/**", + "helpers/dist/**", + "react/dist/**", + "CHANGELOG.md" + ], + "scripts": { + "xbuild": "tsup src/index.ts --format esm,cjs --dts --external react", + "build": "tsup", + "dev": "tsup src/index.ts --format esm,cjs --watch --dts --external react", + "xdev": "tsup --watch", + "lint": "eslint \"src/**/*.ts*\"", + "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist", + "type-check": "tsc --noEmit", + "prettier-check": "prettier --check \"./**/*.ts*\"", + "test": "pnpm test:node && pnpm test:edge", + "#test": "pnpm test:node && pnpm test:edge && pnpm test:ui && pnpm test:e2e", + "test:edge": "vitest --config vitest.edge.config.js --run", + "test:node": "vitest --config vitest.node.config.js --run", + "test:ui": "pnpm test:ui:react", + "test:ui:react": "vitest --config vitest.ui.react.config.js --run", + "test:e2e": "playwright test", + "test:edge:watch": "vitest --config vitest.edge.config.js", + "test:node:watch": "vitest --config vitest.node.config.js", + "test:ui:react:watch": "vitest --config vitest.ui.react.config.js" + }, + "dependencies": { + "openai": "^4.63.0", + "zod": "^3.23.8" + }, + "devDependencies": { + "@baseai/eslint-config": "workspace:*", + "@baseai/tsconfig": "workspace:*", + "@edge-runtime/vm": "^4.0.3", + "@playwright/test": "^1.47.2", + "@testing-library/react": "^16.0.1", + "@types/node": "^22.6.1", + "@types/react": "^18.3.9", + "@vitejs/plugin-react": "^4.3.1", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.2.1", + "jsdom": "^25.0.1", + "react": "^18", + "tsup": "^8.3.0", + "typescript": "^5.6.2", + "vitest": "1.6.0" + }, + "publishConfig": { + "access": "public" + }, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "require": "./dist/index.js", + "import": "./dist/index.mjs" + }, + "./react": { + "types": "./react/dist/index.d.ts", + "require": "./react/dist/index.js", + "import": "./react/dist/index.mjs" + }, + "./pipes": { + "types": "./pipes/dist/index.d.ts", + "require": "./pipes/dist/index.js", + "import": "./pipes/dist/index.mjs" + }, + "./helpers": { + "types": "./helpers/dist/index.d.ts", + "require": "./helpers/dist/index.js", + "import": "./helpers/dist/index.mjs" + } + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "react": "^18 || ^19", + "zod": "^3.0.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "zod": { + "optional": true + } + }, + "homepage": "https://BaseAI.dev", + "repository": { + "type": "git", + "url": "git+https://github.com/LangbaseInc/baseai.git" + }, + "bugs": { + "url": "https://github.com/LangbaseInc/baseai/issues" + }, + "author": { + "name": "Langbase", + "url": "https://BaseAI.dev" + }, + "keywords": [ + "ai", + "llm", + "langbase core", + "langbase sdk", + "baseai", + "base ai", + "langbase", + "langbase.com", + "generative AI" + ] } \ No newline at end of file From 4dc0d36ebed4753e568f9ef10f80e1980909768a Mon Sep 17 00:00:00 2001 From: Ahmad Bilal Date: Fri, 13 Dec 2024 21:43:12 +0500 Subject: [PATCH 10/12] =?UTF-8?q?=F0=9F=91=8C=20IMPROVE:=20Logs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/baseai/src/deploy/document.ts | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/baseai/src/deploy/document.ts b/packages/baseai/src/deploy/document.ts index 5c777d0c..9c7b112c 100644 --- a/packages/baseai/src/deploy/document.ts +++ b/packages/baseai/src/deploy/document.ts @@ -7,7 +7,7 @@ import { handleError, handleInvalidConfig, listMemoryDocuments, - uploadDocumentsToMemory, + uploadDocumentsToMemory } from '.'; import path from 'path'; import fs from 'fs/promises'; @@ -19,7 +19,10 @@ import { } from '@/utils/memory/load-memory-files'; import type { MemoryI } from 'types/memory'; import { compareDocumentLists } from '@/utils/memory/compare-docs-list'; -import { retrieveAuthentication, type Account } from '@/utils/retrieve-credentials'; +import { + retrieveAuthentication, + type Account +} from '@/utils/retrieve-credentials'; type Spinner = ReturnType; @@ -166,9 +169,9 @@ export async function handleSingleDocDeploy({ documents: [document], name: memory.name }); - p.log.success( - `Document "${document.name}" uploaded to memory "${memory.name}".` - ); + // p.log.success( + // `Document "${document.name}" uploaded to memory "${memory.name}".` + // ); return; } @@ -188,9 +191,9 @@ export async function handleSingleDocDeploy({ documents: [document], name: memory.name }); - p.log.success( - `Document "${document.name}" uploaded to memory "${memory.name}".` - ); + // p.log.success( + // `Document "${document.name}" uploaded to memory "${memory.name}".` + // ); return; } From 93affe64d7ffd341821c28367063b424d8eae89c Mon Sep 17 00:00:00 2001 From: Ahmad Bilal Date: Fri, 13 Dec 2024 22:15:40 +0500 Subject: [PATCH 11/12] =?UTF-8?q?=F0=9F=90=9B=20FIX:=20Logs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/baseai/src/utils/memory/load-memory-files.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/baseai/src/utils/memory/load-memory-files.ts b/packages/baseai/src/utils/memory/load-memory-files.ts index e643309e..9570f863 100644 --- a/packages/baseai/src/utils/memory/load-memory-files.ts +++ b/packages/baseai/src/utils/memory/load-memory-files.ts @@ -65,8 +65,6 @@ export const loadMemoryFilesFromCustomDir = async ({ process.exit(1); } - console.log('Reading documents in memory...'); - // Get all files that match the glob patterns and are tracked by git let allFiles: string[]; try { From 8cc492a74774e29dd2d5438f53c79a2b46316c19 Mon Sep 17 00:00:00 2001 From: Ahmad Bilal Date: Fri, 13 Dec 2024 22:32:35 +0500 Subject: [PATCH 12/12] =?UTF-8?q?=F0=9F=93=A6=20NEW:=20snapshot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/baseai/package.json | 230 ++++++++++++++++----------------- packages/core/package.json | 242 +++++++++++++++++------------------ 2 files changed, 236 insertions(+), 236 deletions(-) diff --git a/packages/baseai/package.json b/packages/baseai/package.json index ce0f1610..1d9e00a6 100644 --- a/packages/baseai/package.json +++ b/packages/baseai/package.json @@ -1,116 +1,116 @@ { - "name": "baseai", - "description": "The Web AI Framework Dev - BaseAI.dev", - "version": "0.9.42-snapshot.0", - "license": "UNLICENSED", - "type": "module", - "main": "./dist/index.js", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", - "bin": { - "baseai": "bin/baseai.js" - }, - "author": { - "name": "Langbase", - "url": "https://BaseAI.dev" - }, - "repository": { - "type": "git", - "url": "https://github.com/LangbaseInc/baseai.git", - "directory": "packages/cli" - }, - "bugs": { - "url": "https://github.com/LangbaseInc/baseai/issues" - }, - "homepage": "https://BaseAI.dev", - "files": [ - "dist/**" - ], - "scripts": { - "build": "tsup", - "dev": "tsup --watch", - "lint": "eslint \"src/**/*.ts*\"", - "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist", - "type-check": "tsc --noEmit", - "prettier-check": "prettier --check \"./**/*.ts*\"", - "test": "pnpm test:node && pnpm test:edge", - "#test": "pnpm test:node && pnpm test:edge && pnpm test:ui && pnpm test:e2e", - "test:edge": "vitest --config vitest.edge.config.js --run", - "test:node": "vitest --config vitest.node.config.js --run", - "test:ui": "pnpm test:ui:react", - "test:ui:react": "vitest --config vitest.ui.react.config.js --run", - "test:e2e": "playwright test", - "test:edge:watch": "vitest --config vitest.edge.config.js", - "test:node:watch": "vitest --config vitest.node.config.js", - "test:ui:react:watch": "vitest --config vitest.ui.react.config.js" - }, - "dependencies": { - "@antfu/ni": "^0.23.0", - "@clack/core": "^0.3.4", - "@clack/prompts": "^0.7.0", - "@hono/node-server": "^1.13.1", - "@hono/zod-openapi": "^0.16.0", - "@sindresorhus/slugify": "^2.2.1", - "camelcase": "^8.0.0", - "chalk": "^5.3.0", - "cli-alerts": "^2.0.0", - "cli-handle-error": "^4.4.0", - "cli-handle-unhandled": "^1.1.1", - "cli-meow-help": "^4.0.0", - "cli-table3": "^0.6.5", - "cli-welcome": "^3.0.0", - "compute-cosine-similarity": "^1.1.0", - "cosmiconfig": "^9.0.0", - "cosmiconfig-typescript-loader": "^5.0.0", - "dotenv": "^16.4.5", - "execa": "^9.4.0", - "fast-glob": "^3.3.2", - "figures": "^6.1.0", - "get-package-json-file": "^2.0.0", - "hono": "^4.5.11", - "js-tiktoken": "^1.0.14", - "log-symbols": "^7.0.0", - "lowdb": "^7.0.1", - "meow": "^13.2.0", - "node-fetch": "^3.3.2", - "open": "^10.1.0", - "openai": "^4.63.0", - "p-map": "^7.0.2", - "picocolors": "^1.1.0", - "prettier": "^3.3.3", - "source-map-support": "^0.5.21", - "unpdf": "^0.11.0", - "uuid": "^10.0.0", - "xlsx": "^0.18.5", - "zod": "^3.23.8", - "zod-error": "^1.5.0", - "zod-validation-error": "^3.4.0" - }, - "devDependencies": { - "@baseai/eslint-config": "workspace:*", - "@baseai/tsconfig": "workspace:*", - "@types/node": "^22.6.1", - "tsup": "^8.3.0", - "tsx": "^4.19.1", - "typescript": "^5.6.2", - "vitest": "1.6.0" - }, - "keywords": [ - "baseai", - "base", - "base AI framework", - "BaseAI.dev", - "composable AI", - "AI agents", - "AI multi agents", - "ai", - "llm", - "langbase core", - "langbase sdk", - "baseai", - "base ai", - "langbase", - "langbase.com", - "generative AI" - ] -} \ No newline at end of file + "name": "baseai", + "description": "The Web AI Framework Dev - BaseAI.dev", + "version": "0.9.41", + "license": "UNLICENSED", + "type": "module", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "bin": { + "baseai": "bin/baseai.js" + }, + "author": { + "name": "Langbase", + "url": "https://BaseAI.dev" + }, + "repository": { + "type": "git", + "url": "https://github.com/LangbaseInc/baseai.git", + "directory": "packages/cli" + }, + "bugs": { + "url": "https://github.com/LangbaseInc/baseai/issues" + }, + "homepage": "https://BaseAI.dev", + "files": [ + "dist/**" + ], + "scripts": { + "build": "tsup", + "dev": "tsup --watch", + "lint": "eslint \"src/**/*.ts*\"", + "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist", + "type-check": "tsc --noEmit", + "prettier-check": "prettier --check \"./**/*.ts*\"", + "test": "pnpm test:node && pnpm test:edge", + "#test": "pnpm test:node && pnpm test:edge && pnpm test:ui && pnpm test:e2e", + "test:edge": "vitest --config vitest.edge.config.js --run", + "test:node": "vitest --config vitest.node.config.js --run", + "test:ui": "pnpm test:ui:react", + "test:ui:react": "vitest --config vitest.ui.react.config.js --run", + "test:e2e": "playwright test", + "test:edge:watch": "vitest --config vitest.edge.config.js", + "test:node:watch": "vitest --config vitest.node.config.js", + "test:ui:react:watch": "vitest --config vitest.ui.react.config.js" + }, + "dependencies": { + "@antfu/ni": "^0.23.0", + "@clack/core": "^0.3.4", + "@clack/prompts": "^0.7.0", + "@hono/node-server": "^1.13.1", + "@hono/zod-openapi": "^0.16.0", + "@sindresorhus/slugify": "^2.2.1", + "camelcase": "^8.0.0", + "chalk": "^5.3.0", + "cli-alerts": "^2.0.0", + "cli-handle-error": "^4.4.0", + "cli-handle-unhandled": "^1.1.1", + "cli-meow-help": "^4.0.0", + "cli-table3": "^0.6.5", + "cli-welcome": "^3.0.0", + "compute-cosine-similarity": "^1.1.0", + "cosmiconfig": "^9.0.0", + "cosmiconfig-typescript-loader": "^5.0.0", + "dotenv": "^16.4.5", + "execa": "^9.4.0", + "fast-glob": "^3.3.2", + "figures": "^6.1.0", + "get-package-json-file": "^2.0.0", + "hono": "^4.5.11", + "js-tiktoken": "^1.0.14", + "log-symbols": "^7.0.0", + "lowdb": "^7.0.1", + "meow": "^13.2.0", + "node-fetch": "^3.3.2", + "open": "^10.1.0", + "openai": "^4.63.0", + "p-map": "^7.0.2", + "picocolors": "^1.1.0", + "prettier": "^3.3.3", + "source-map-support": "^0.5.21", + "unpdf": "^0.11.0", + "uuid": "^10.0.0", + "xlsx": "^0.18.5", + "zod": "^3.23.8", + "zod-error": "^1.5.0", + "zod-validation-error": "^3.4.0" + }, + "devDependencies": { + "@baseai/eslint-config": "workspace:*", + "@baseai/tsconfig": "workspace:*", + "@types/node": "^22.6.1", + "tsup": "^8.3.0", + "tsx": "^4.19.1", + "typescript": "^5.6.2", + "vitest": "1.6.0" + }, + "keywords": [ + "baseai", + "base", + "base AI framework", + "BaseAI.dev", + "composable AI", + "AI agents", + "AI multi agents", + "ai", + "llm", + "langbase core", + "langbase sdk", + "baseai", + "base ai", + "langbase", + "langbase.com", + "generative AI" + ] +} diff --git a/packages/core/package.json b/packages/core/package.json index b37e7158..61eb0758 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,122 +1,122 @@ { - "name": "@baseai/core", - "description": "The Web AI Framework's core - BaseAI.dev", - "version": "0.9.42-snapshot.0", - "license": "Apache-2.0", - "sideEffects": false, - "main": "./dist/index.js", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", - "files": [ - "dist/**", - "pipes/dist/**", - "helpers/dist/**", - "react/dist/**", - "CHANGELOG.md" - ], - "scripts": { - "xbuild": "tsup src/index.ts --format esm,cjs --dts --external react", - "build": "tsup", - "dev": "tsup src/index.ts --format esm,cjs --watch --dts --external react", - "xdev": "tsup --watch", - "lint": "eslint \"src/**/*.ts*\"", - "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist", - "type-check": "tsc --noEmit", - "prettier-check": "prettier --check \"./**/*.ts*\"", - "test": "pnpm test:node && pnpm test:edge", - "#test": "pnpm test:node && pnpm test:edge && pnpm test:ui && pnpm test:e2e", - "test:edge": "vitest --config vitest.edge.config.js --run", - "test:node": "vitest --config vitest.node.config.js --run", - "test:ui": "pnpm test:ui:react", - "test:ui:react": "vitest --config vitest.ui.react.config.js --run", - "test:e2e": "playwright test", - "test:edge:watch": "vitest --config vitest.edge.config.js", - "test:node:watch": "vitest --config vitest.node.config.js", - "test:ui:react:watch": "vitest --config vitest.ui.react.config.js" - }, - "dependencies": { - "openai": "^4.63.0", - "zod": "^3.23.8" - }, - "devDependencies": { - "@baseai/eslint-config": "workspace:*", - "@baseai/tsconfig": "workspace:*", - "@edge-runtime/vm": "^4.0.3", - "@playwright/test": "^1.47.2", - "@testing-library/react": "^16.0.1", - "@types/node": "^22.6.1", - "@types/react": "^18.3.9", - "@vitejs/plugin-react": "^4.3.1", - "eslint": "^8.57.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-prettier": "^5.2.1", - "jsdom": "^25.0.1", - "react": "^18", - "tsup": "^8.3.0", - "typescript": "^5.6.2", - "vitest": "1.6.0" - }, - "publishConfig": { - "access": "public" - }, - "exports": { - ".": { - "types": "./dist/index.d.ts", - "require": "./dist/index.js", - "import": "./dist/index.mjs" - }, - "./react": { - "types": "./react/dist/index.d.ts", - "require": "./react/dist/index.js", - "import": "./react/dist/index.mjs" - }, - "./pipes": { - "types": "./pipes/dist/index.d.ts", - "require": "./pipes/dist/index.js", - "import": "./pipes/dist/index.mjs" - }, - "./helpers": { - "types": "./helpers/dist/index.d.ts", - "require": "./helpers/dist/index.js", - "import": "./helpers/dist/index.mjs" - } - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "react": "^18 || ^19", - "zod": "^3.0.0" - }, - "peerDependenciesMeta": { - "react": { - "optional": true - }, - "zod": { - "optional": true - } - }, - "homepage": "https://BaseAI.dev", - "repository": { - "type": "git", - "url": "git+https://github.com/LangbaseInc/baseai.git" - }, - "bugs": { - "url": "https://github.com/LangbaseInc/baseai/issues" - }, - "author": { - "name": "Langbase", - "url": "https://BaseAI.dev" - }, - "keywords": [ - "ai", - "llm", - "langbase core", - "langbase sdk", - "baseai", - "base ai", - "langbase", - "langbase.com", - "generative AI" - ] -} \ No newline at end of file + "name": "@baseai/core", + "description": "The Web AI Framework's core - BaseAI.dev", + "version": "0.9.41", + "license": "Apache-2.0", + "sideEffects": false, + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "files": [ + "dist/**", + "pipes/dist/**", + "helpers/dist/**", + "react/dist/**", + "CHANGELOG.md" + ], + "scripts": { + "xbuild": "tsup src/index.ts --format esm,cjs --dts --external react", + "build": "tsup", + "dev": "tsup src/index.ts --format esm,cjs --watch --dts --external react", + "xdev": "tsup --watch", + "lint": "eslint \"src/**/*.ts*\"", + "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist", + "type-check": "tsc --noEmit", + "prettier-check": "prettier --check \"./**/*.ts*\"", + "test": "pnpm test:node && pnpm test:edge", + "#test": "pnpm test:node && pnpm test:edge && pnpm test:ui && pnpm test:e2e", + "test:edge": "vitest --config vitest.edge.config.js --run", + "test:node": "vitest --config vitest.node.config.js --run", + "test:ui": "pnpm test:ui:react", + "test:ui:react": "vitest --config vitest.ui.react.config.js --run", + "test:e2e": "playwright test", + "test:edge:watch": "vitest --config vitest.edge.config.js", + "test:node:watch": "vitest --config vitest.node.config.js", + "test:ui:react:watch": "vitest --config vitest.ui.react.config.js" + }, + "dependencies": { + "openai": "^4.63.0", + "zod": "^3.23.8" + }, + "devDependencies": { + "@baseai/eslint-config": "workspace:*", + "@baseai/tsconfig": "workspace:*", + "@edge-runtime/vm": "^4.0.3", + "@playwright/test": "^1.47.2", + "@testing-library/react": "^16.0.1", + "@types/node": "^22.6.1", + "@types/react": "^18.3.9", + "@vitejs/plugin-react": "^4.3.1", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.2.1", + "jsdom": "^25.0.1", + "react": "^18", + "tsup": "^8.3.0", + "typescript": "^5.6.2", + "vitest": "1.6.0" + }, + "publishConfig": { + "access": "public" + }, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "require": "./dist/index.js", + "import": "./dist/index.mjs" + }, + "./react": { + "types": "./react/dist/index.d.ts", + "require": "./react/dist/index.js", + "import": "./react/dist/index.mjs" + }, + "./pipes": { + "types": "./pipes/dist/index.d.ts", + "require": "./pipes/dist/index.js", + "import": "./pipes/dist/index.mjs" + }, + "./helpers": { + "types": "./helpers/dist/index.d.ts", + "require": "./helpers/dist/index.js", + "import": "./helpers/dist/index.mjs" + } + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "react": "^18 || ^19", + "zod": "^3.0.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "zod": { + "optional": true + } + }, + "homepage": "https://BaseAI.dev", + "repository": { + "type": "git", + "url": "git+https://github.com/LangbaseInc/baseai.git" + }, + "bugs": { + "url": "https://github.com/LangbaseInc/baseai/issues" + }, + "author": { + "name": "Langbase", + "url": "https://BaseAI.dev" + }, + "keywords": [ + "ai", + "llm", + "langbase core", + "langbase sdk", + "baseai", + "base ai", + "langbase", + "langbase.com", + "generative AI" + ] +}