diff --git a/DEPLOY b/DEPLOY index 2cab3b28..22ab22f3 100644 --- a/DEPLOY +++ b/DEPLOY @@ -1 +1 @@ -Deployment at: Thu Oct 31 22:47:48 CET 2024 +Deployment at: Sat, Nov 23, 2024 2:36:22 AM diff --git a/apps/baseai.dev/src/app/page.tsx b/apps/baseai.dev/src/app/page.tsx index 86eb6538..c975995f 100644 --- a/apps/baseai.dev/src/app/page.tsx +++ b/apps/baseai.dev/src/app/page.tsx @@ -1,5 +1,9 @@ -import Hero from "@/components/home/hero"; +import Hero from '@/components/home/hero'; export default function Homepage() { - return ; + return ( +
+ +
+ ); } diff --git a/apps/baseai.dev/src/components/home/hero.tsx b/apps/baseai.dev/src/components/home/hero.tsx index 0d2978ae..db940925 100644 --- a/apps/baseai.dev/src/components/home/hero.tsx +++ b/apps/baseai.dev/src/components/home/hero.tsx @@ -10,12 +10,9 @@ import WebGLInitializer from './webgl'; import Link from 'next/link'; const inter = Inter({ subsets: ['latin'] }); -export default function Hero({ }) { +export default function Hero({}) { return ( -
-
- -
+
); @@ -23,7 +20,7 @@ export default function Hero({ }) { function Content() { return ( -
+
@@ -40,9 +37,11 @@ function Content() {
-
+
+ +
-
+
+ ); }; -export default WebGLInitializer; \ No newline at end of file +export default WebGLInitializer; diff --git a/apps/baseai.dev/src/styles/global.css b/apps/baseai.dev/src/styles/global.css index babdfeba..7fb0d075 100644 --- a/apps/baseai.dev/src/styles/global.css +++ b/apps/baseai.dev/src/styles/global.css @@ -116,3 +116,10 @@ html { font-weight: normal; font-style: normal; } + +canvas { + width: 100%; + height: 100%; + display: block; +} + diff --git a/examples/astro/package.json b/examples/astro/package.json index e8fb44ab..bca1a46a 100644 --- a/examples/astro/package.json +++ b/examples/astro/package.json @@ -17,7 +17,7 @@ "@astrojs/react": "^3.6.2", "@astrojs/tailwind": "^5.1.1", "@astrojs/vercel": "^7.8.1", - "@baseai/core": "^0.9.32", + "@baseai/core": "^0.9.33", "@radix-ui/react-slot": "^1.1.0", "@types/react": "^18.3.9", "@types/react-dom": "^18.3.0", @@ -33,6 +33,6 @@ "typescript": "^5.6.2" }, "devDependencies": { - "baseai": "^0.9.32" + "baseai": "^0.9.33" } } diff --git a/examples/nextjs/package.json b/examples/nextjs/package.json index 54befdb7..8bbafef7 100644 --- a/examples/nextjs/package.json +++ b/examples/nextjs/package.json @@ -11,7 +11,7 @@ "baseai": "baseai" }, "dependencies": { - "@baseai/core": "^0.9.32", + "@baseai/core": "^0.9.33", "@radix-ui/react-slot": "^1.1.0", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", @@ -29,7 +29,7 @@ "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18", - "baseai": "^0.9.32", + "baseai": "^0.9.33", "eslint": "^8", "eslint-config-next": "14.2.5", "mini-css-extract-plugin": "^2.9.0", diff --git a/examples/nodejs/.env.baseai.example b/examples/nodejs/.env.baseai.example index 8c643651..b0d9e992 100644 --- a/examples/nodejs/.env.baseai.example +++ b/examples/nodejs/.env.baseai.example @@ -19,3 +19,4 @@ GROQ_API_KEY= MISTRAL_API_KEY= PERPLEXITY_API_KEY= TOGETHER_API_KEY= +XAI_API_KEY= diff --git a/examples/nodejs/.gitignore b/examples/nodejs/.gitignore index a0dbef56..a7d75ffe 100644 --- a/examples/nodejs/.gitignore +++ b/examples/nodejs/.gitignore @@ -79,3 +79,7 @@ assets/img/.DS_Store **/.baseai/ # env file .env +# baseai +**/.baseai/ +# env file +.env diff --git a/examples/nodejs/package.json b/examples/nodejs/package.json index 35524384..f157eeea 100644 --- a/examples/nodejs/package.json +++ b/examples/nodejs/package.json @@ -17,11 +17,11 @@ "author": "Ahmad Awais (https://twitter.com/MrAhmadAwais)", "license": "UNLICENSED", "dependencies": { - "@baseai/core": "^0.9.32", + "@baseai/core": "^0.9.33", "dotenv": "^16.4.5" }, "devDependencies": { - "baseai": "^0.9.32", + "baseai": "0.9.29-snapshot.0", "tsx": "^4.19.0" } } diff --git a/examples/remix/package.json b/examples/remix/package.json index 00c851a4..dbd12357 100644 --- a/examples/remix/package.json +++ b/examples/remix/package.json @@ -13,7 +13,7 @@ "baseai": "baseai" }, "dependencies": { - "@baseai/core": "^0.9.32", + "@baseai/core": "^0.9.33", "@radix-ui/react-slot": "^1.1.0", "@remix-run/node": "2.12.0", "@remix-run/react": "2.12.0", @@ -35,7 +35,7 @@ "@typescript-eslint/parser": "^6.7.4", "@vercel/remix": "2.12.0", "autoprefixer": "^10.4.20", - "baseai": "^0.9.32", + "baseai": "^0.9.33", "eslint": "^8.38.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.28.1", diff --git a/packages/baseai/CHANGELOG.md b/packages/baseai/CHANGELOG.md index e94fda03..4bbc2087 100644 --- a/packages/baseai/CHANGELOG.md +++ b/packages/baseai/CHANGELOG.md @@ -1,5 +1,11 @@ # baseai +## 0.9.33 + +### Patch Changes + +- 📦 NEW: Params for pipe.run() sdk support + ## 0.9.32 ### Patch Changes diff --git a/packages/baseai/package.json b/packages/baseai/package.json index f21a845b..0e1c22c1 100644 --- a/packages/baseai/package.json +++ b/packages/baseai/package.json @@ -1,7 +1,7 @@ { "name": "baseai", "description": "The Web AI Framework Dev - BaseAI.dev", - "version": "0.9.32", + "version": "0.9.33", "license": "UNLICENSED", "type": "module", "main": "./dist/index.js", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index dcf7b3d4..b2b793ec 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,11 @@ # `baseai` SDK +## 0.9.33 + +### Patch Changes + +- 📦 NEW: Params for pipe.run() sdk support + ## 0.9.32 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index c1a1053a..d2b950ff 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@baseai/core", "description": "The Web AI Framework's core - BaseAI.dev", - "version": "0.9.32", + "version": "0.9.33", "license": "Apache-2.0", "sideEffects": false, "main": "./dist/index.js", diff --git a/packages/core/src/pipes/pipes.ts b/packages/core/src/pipes/pipes.ts index d7fdb6dd..b675ec2c 100644 --- a/packages/core/src/pipes/pipes.ts +++ b/packages/core/src/pipes/pipes.ts @@ -19,6 +19,7 @@ export interface RunOptions { threadId?: string; rawResponse?: boolean; runTools?: boolean; + name?: string; // Pipe name for SDK } export interface RunOptionsStream extends RunOptions { @@ -162,6 +163,7 @@ export class Pipe { private async handleStreamResponse( options: RunOptionsStream, response: RunResponseStream, + pipeName: string, ): Promise { const endpoint = '/v1/pipes/run'; const stream = this.isStreamRequested(options); @@ -216,6 +218,7 @@ export class Pipe { messages, threadId: currentResponse.threadId, }, + pipeName ); callCount++; @@ -244,6 +247,7 @@ export class Pipe { const modelProvider = getProvider(providerString); const isAnthropic = modelProvider === ANTHROPIC; const hasTools = this.pipe.tools.length > 0; + const pipeName = options.name || this.pipe.name; let stream = this.isStreamRequested(options); @@ -260,7 +264,7 @@ export class Pipe { let response = await this.createRequest< RunResponse | RunResponseStream - >(endpoint, body); + >(endpoint, body, pipeName); if (Object.entries(response).length === 0) { return {} as RunResponse | RunResponseStream; } @@ -277,6 +281,7 @@ export class Pipe { return await this.handleStreamResponse( options as RunOptionsStream, response as RunResponseStream, + pipeName ); } @@ -319,7 +324,7 @@ export class Pipe { messages, stream: false, threadId: currentResponse.threadId, - }); + }, pipeName); callCount++; @@ -338,17 +343,22 @@ export class Pipe { return currentResponse; } - private async createRequest(endpoint: string, body: any): Promise { + private async createRequest( + endpoint: string, + body: any, + pipeName?: string, + ): Promise { const isProdEnv = this.prod; const prodOptions = { endpoint, body: { ...body, - name: this.pipe.name, + name: pipeName || this.pipe.name, }, }; let localOptions = {} as any; + if (!isProdEnv) { const providerString = this.pipe.model.split(':')[0]; const modelProvider = getProvider(providerString); @@ -360,9 +370,7 @@ export class Pipe { llmApiKey: getLLMApiKey(modelProvider), }, }; - } - if (!isProdEnv) { const isServerRunning = await isLocalServerRunning(); if (!isServerRunning) return {} as T; } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 657e9835..a8906479 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -269,7 +269,7 @@ importers: specifier: ^7.8.1 version: 7.8.1(astro@4.15.10(@types/node@22.7.4)(rollup@4.24.0)(terser@5.34.1)(typescript@5.6.2))(next@14.2.5(@babel/core@7.25.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) '@baseai/core': - specifier: ^0.9.32 + specifier: ^0.9.31 version: 0.9.32(react@18.3.1)(zod@3.23.8) '@radix-ui/react-slot': specifier: ^1.1.0 @@ -312,13 +312,13 @@ importers: version: 5.6.2 devDependencies: baseai: - specifier: ^0.9.32 + specifier: ^0.9.31 version: 0.9.32(@types/node@22.7.4)(typescript@5.6.2) examples/nextjs: dependencies: '@baseai/core': - specifier: ^0.9.32 + specifier: ^0.9.31 version: 0.9.32(react@18.3.1)(zod@3.23.8) '@radix-ui/react-slot': specifier: ^1.1.0 @@ -367,7 +367,7 @@ importers: specifier: ^18 version: 18.3.0 baseai: - specifier: ^0.9.32 + specifier: ^0.9.31 version: 0.9.32(@types/node@20.16.10)(typescript@5.6.2) eslint: specifier: ^8 @@ -391,15 +391,15 @@ importers: examples/nodejs: dependencies: '@baseai/core': - specifier: ^0.9.32 + specifier: ^0.9.31 version: 0.9.32(react@18.3.1)(zod@3.23.8) dotenv: specifier: ^16.4.5 version: 16.4.5 devDependencies: baseai: - specifier: ^0.9.32 - version: 0.9.32(@types/node@22.7.4)(typescript@5.6.2) + specifier: 0.9.29-snapshot.0 + version: 0.9.29-snapshot.0(@types/node@22.7.4)(typescript@5.6.2) tsx: specifier: ^4.19.0 version: 4.19.1 @@ -407,7 +407,7 @@ importers: examples/remix: dependencies: '@baseai/core': - specifier: ^0.9.32 + specifier: ^0.9.31 version: 0.9.32(react@18.3.1)(zod@3.23.8) '@radix-ui/react-slot': specifier: ^1.1.0 @@ -468,7 +468,7 @@ importers: specifier: ^10.4.20 version: 10.4.20(postcss@8.4.47) baseai: - specifier: ^0.9.32 + specifier: ^0.9.31 version: 0.9.32(@types/node@22.7.4)(typescript@5.6.2) eslint: specifier: ^8.38.0 @@ -12791,7 +12791,7 @@ snapshots: base64-js@1.5.1: {} - baseai@0.9.32(@types/node@20.16.10)(typescript@5.6.2): + baseai@0.9.29-snapshot.0(@types/node@22.7.4)(typescript@5.6.2): dependencies: '@antfu/ni': 0.23.0 '@clack/core': 0.3.4