diff --git a/.changeset/config.json b/.changeset/config.json index 302e184b..68c93e76 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -12,6 +12,7 @@ "example-astro", "example-nextjs", "example-nodejs", - "example-remix" + "example-remix", + "testing" ] } diff --git a/DEPLOY b/DEPLOY index 2cab3b28..44a20416 100644 --- a/DEPLOY +++ b/DEPLOY @@ -1 +1 @@ -Deployment at: Thu Oct 31 22:47:48 CET 2024 +Deployment at: Sun Sep 29 14:38:57 PDT 2024 diff --git a/README.md b/README.md index 4e1efd3d..09a2051f 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -> BaseAI is now archived in the favor of [Langbase AI Primitives](https://langbase.com/docs). The more we built BaseAI the more we realized frameworks are a bad idea in AI engineering. This space is moving fast and frameworks become blockers. Instead you should be using AI primitives, like [memory, pipes, agents](https://langbase.com/docs) that work with any language as APIs and with TypeScript and Python SDKs. You can use any coding agent, like [CommandCode](https://commandcode.ai) to make your own AI framework with these AI primitives. BaseAI is a great example how. - -

- + + + +

BaseAI

@@ -15,196 +15,11 @@ ## Getting Started -BaseAI is the AI framework for building serverless and composable AI agents with memory and tools. It allows you to develop AI agent pipes on your local machine with integrated agentic tools and memory (RAG). Visit our [BaseAI.dev/learn](https://baseai.dev/learn) guide to start with BaseAI. - -### Documentation (recommended) - -Please check [BaseAI.dev/docs](https://baseai.dev/docs) and [BaseAI.dev/learn](https://baseai.dev/learn) to get started with full documentation. - - -### 1. Initialize a new BaseAI project - -BaseAI is a TypeScript-first framework. To create a new BaseAI project, run the following command in your project: - -```bash -npx baseai@latest init -``` - -This command will create a `baseai` directory in your project. This is what the directory structure looks like: - -``` -ROOT (of your app) -├── baseai -| ├── baseai.config.ts -| ├── memory -| ├── pipes -| └── tools -├── .env (your env file) -└── package.json -``` - -### 2. Add API keys - -Copy the following in your `.env` file and add appropriate LLM API keys: - -```bash -# !! SERVER SIDE ONLY !! -# Keep all your API keys secret — use only on the server side. - -# TODO: ADD: Both in your production and local env files. -# Langbase API key for your User or Org account. -# How to get this API key https://langbase.com/docs/api-reference/api-keys -LANGBASE_API_KEY= - -# TODO: ADD: LOCAL ONLY. Add only to local env files. -# Following keys are needed for local pipe runs. For providers you are using. -# For Langbase, please add the key to your LLM keysets. -# Read more: Langbase LLM Keysets https://langbase.com/docs/features/keysets -OPENAI_API_KEY= -ANTHROPIC_API_KEY= -COHERE_API_KEY= -FIREWORKS_API_KEY= -GOOGLE_API_KEY= -GROQ_API_KEY= -MISTRAL_API_KEY= -PERPLEXITY_API_KEY= -TOGETHER_API_KEY= -XAI_API_KEY= -``` - -### 3. Create a new AI agent - -Pipe is your custom-built AI agent as an API. It's the fastest way to ship AI features/apps. Let's create a new pipe: - -```bash -npx baseai@latest pipe -``` - -It will ask you for the name, description, and other details of the pipe step-by-step. Once done, a pipe will be created inside the `/baseai/pipes` directory. You can now edit the system prompt, change model params, and more. Here is what a pipe code looks like: - -```ts -import { PipeI } from '@baseai/core'; - -const pipeSummary = (): PipeI => ({ - // Replace with your API key https://langbase.com/docs/api-reference/api-keys - apiKey: process.env.LANGBASE_API_KEY!, - name: 'summary', - description: 'AI Summary agent', - status: 'public', - model: 'openai:gpt-4o-mini', - stream: true, - json: false, - store: true, - moderate: true, - top_p: 1, - max_tokens: 1000, - temperature: 0.7, - presence_penalty: 1, - frequency_penalty: 1, - stop: [], - tool_choice: 'auto', - parallel_tool_calls: true, - messages: [ - { - role: 'system', - content: `You are a helpful AI agent. Make everything Less wordy.` - } - ], - variables: [], - memory: [], - tools: [] -}); - -export default pipeSummary; -``` - -### 4. Integrate pipe in your app - -Let's create a new `index.ts` file in your project root. Now we need to do the following: - -1. Import the pipe config we created. -2. Create a new pipe instance with the pipe config. -3. Run the pipe with a user message. -4. Listen to the stream events. - -Here is what the code looks like: - -```ts -import { Pipe, getRunner } from '@baseai/core'; -import pipeSummarizer from './baseai/pipes/summary'; - -const pipe = new Pipe(pipeSummarizer()); - -const userMsg = ` -Langbase studio is your playground to build, collaborate, and deploy AI. It allows you to experiment with your pipes in real-time, with real data, store messages, version your prompts, and truly helps you take your idea from building prototypes to deployed in production with LLMOps on usage, cost, and quality. -A complete AI developers platform. -- Collaborate: Invite all team members to collaborate on the pipe. Build AI together. -- Developers & Stakeholders: All your R&D team, engineering, product, GTM (marketing and sales), literally invlove every stakeholder can collaborate on the same pipe. It's like a powerful version of GitHub x Google Docs for AI. A complete AI developers platform. -`; - -async function main() { - const { stream } = await pipe.run({ - messages: [{ role: 'user', content: userMsg }], - stream: true, - }); - - const runner = getRunner(stream); - - // Method 1: Using event listeners - runner.on('connect', () => { - console.log('Stream started.\n'); - }); - - runner.on('content', content => { - process.stdout.write(content); - }); - - runner.on('end', () => { - console.log('\nStream ended.'); - }); - - runner.on('error', error => { - console.error('Error:', error); - }); -} - -main(); -``` - -Make sure to install and import `dotenv` at the top if you are using Node.js: - -```ts -import 'dotenv/config'; -``` - -### 5. Run the AI agent - -To run the pipe locally, you need to start the BaseAI server. Run the following command in your terminal: - -```bash -npx baseai@latest dev -``` - -Now, run the `index.ts` file in your terminal: - -```bash -npx tsx index.ts -``` - -You should see the following output in your terminal: - -```md -Stream started. +BaseAI is the AI framework for building declarative and composable AI-powered LLM products. It allows you to develop AI agent pipes on your local machine with integrated agentic tools and memory (RAG). Visit our [learn](https://baseai.dev/learn) guide to get started with BaseAI. -Langbase Studio is your AI development playground. Experiment in real-time with real data, store messages, and version prompts to move from prototype to production seamlessly. +## Documentation -Key Features: -- **Collaborate**: Invite team members to build AI together. -- **Inclusive Teams**: Engage all stakeholders—R&D, engineering, product, and marketing—in a shared space. It’s like GitHub combined with Google Docs for AI development. -Stream ended. -``` -> [!TIP] -> You can also run RAG locally with BaseAI. Check out the memory agent quickstart [guide](https://baseai.dev/docs/memory/quickstart) for more details. +Visit [baseai.dev/docs](https://baseai.dev/docs) for the full documentation. ## Contributing diff --git a/apps/baseai.dev/content/docs/api-reference/pipe-run.mdx b/apps/baseai.dev/content/docs/api-reference/pipe-run.mdx index 29df14f3..f1402e95 100644 --- a/apps/baseai.dev/content/docs/api-reference/pipe-run.mdx +++ b/apps/baseai.dev/content/docs/api-reference/pipe-run.mdx @@ -83,7 +83,6 @@ The BaseAI core package provides a `pipe.run()` function that you can use in you ```ts {{title: 'RunOptions Object'}} interface RunOptions { messages?: Message[]; - runTools?: boolean; variables?: Variable[]; threadId?: string; rawResponse?: boolean; @@ -156,14 +155,6 @@ The BaseAI core package provides a `pipe.run()` function that you can use in you --- - ### runTools - - - - Enable if you want BaseAI to automically run tools**.** - - - ### variables diff --git a/apps/baseai.dev/content/docs/docs/index.mdx b/apps/baseai.dev/content/docs/docs/index.mdx index a0160e34..f565e29e 100644 --- a/apps/baseai.dev/content/docs/docs/index.mdx +++ b/apps/baseai.dev/content/docs/docs/index.mdx @@ -9,13 +9,13 @@ modified: 2024-09-24 --- - BaseAI.dev + BaseAI.dev

BaseAI Docs

- BaseAI is the first web AI framework for building Serverless AI agents with Node.js and TypeScript. + BaseAI is the first web AI framework built for web developers. - **OPEN**: BaseAI is **free and open-source** - **LOCAL**: world-class **local developer experience** @@ -27,7 +27,7 @@ modified: 2024-09-24 - BaseAI is the first web AI framework for building Serverless AI agents with Node.js and TypeScript. + The first Web AI Framework for web developers. - **OPEN**: BaseAI is **free and open-source** - **LOCAL**: world-class **local dev experience** diff --git a/apps/baseai.dev/content/docs/docs/supported-models-and-providers.mdx b/apps/baseai.dev/content/docs/docs/supported-models-and-providers.mdx index 5ffae1a5..3c578bf7 100644 --- a/apps/baseai.dev/content/docs/docs/supported-models-and-providers.mdx +++ b/apps/baseai.dev/content/docs/docs/supported-models-and-providers.mdx @@ -76,7 +76,6 @@ Learn more about [using Ollama models](/docs/guides/using-ollama-models) in Base | Model | Provider | Owner | Context | Cost* | |---------------------------------------------------------------------------------------------------------------------------|----------|------------|---------|----------------------------------------------| -| Llama-3.3-70B-Instruct-Turbo
ID: | Together | Meta | 131,072 | $0.88 prompt
$0.88 completion | | Llama-3.1-405B-Instruct-Turbo
ID: | Together | Meta | 4,096 | $5 prompt
$5 completion | | Llama-3.1-70B-Instruct-Turbo
ID: | Together | Meta | 8,192 | $0.88 prompt
$0.88 completion | | Llama-3.1-8B-Instruct-Turbo
ID: | Together | Meta | 8,192 | $0.18 prompt
$0.18 completion | @@ -122,7 +121,6 @@ Learn more about [using Ollama models](/docs/guides/using-ollama-models) in Base | Model | Provider | Owner | Context | Cost* | |-----------------------------------------------------------------------------------------|----------|---------|---------|---------------------------------------------| -| Llama-3.3-70b-versatile
ID: | Groq | Meta | 128,000 | $0.59 prompt
$0.79 completion | | Llama-3.1-70b-versatile
ID: | Groq | Meta | 131,072 | $0.59 prompt
$0.79 completion | | Llama-3.1-8b-instant
ID: | Groq | Meta | 131,072 | $0.59 prompt
$0.79 completion | | Llama-3-70b
ID: | Groq | Meta | 8,192 | $0.59 prompt
$0.79 completion | @@ -138,7 +136,6 @@ Learn more about [using Ollama models](/docs/guides/using-ollama-models) in Base | Model | Provider | Owner | Context | Cost* | |------------------------------------------------------------------------------|--------------|-------|---------|--------------------------------------------| | Llama-3.2-3b
ID: | Fireworks AI | Meta | 131,072 | $0.1 prompt
$0.1 completion | -| Llama 3.3 70B Instruct
ID: | Fireworks AI | Meta | 131,072 | $0.9 prompt
$0.9 completion | | Llama-3.2-1b
ID: | Fireworks AI | Meta | 131,072 | $0.1 prompt
$0.1 completion | | Llama-3.1-405b
ID: | Fireworks AI | Meta | 131,072 | $3 prompt
$3 completion | | Llama-3.1-70b
ID: | Fireworks AI | Meta | 131,072 | $0.9 prompt
$0.9 completion | @@ -197,61 +194,6 @@ See the [list of models that support JSON mode](/features/json-mode) and how to Completion and Prompt costs are based on the provider's pricing. Langbase does not charge on top of the provider's costs. -## Tool Support - -The following models support tool calls in BaseAI. - -### OpenAI - -| Model | Parallel Tool Call Support | Tool Choice Support | -|-------------------------------------------------------------------------------------|----------|--------| -| o1-preview
ID: | `true` | `true` | -| o1-mini
ID: | `true` | `true` | -| gpt-4o
ID: | `true` | `true` | -| gpt-4o-2024-08-06
ID: | `true` | `true` | -| gpt-4o-mini
ID: | `true` | `true` | -| gpt-4-turbo
ID: | `true` | `true` | -| gpt-4-turbo-preview
ID: | `true` | `true` | -| gpt-4-0125-preview
ID: | `true` | `true` | -| gpt-4-1106-preview
ID: | `true` | `true` | -| gpt-4
ID: | `true` | `true` | -| gpt-4-0613
ID: | `true` | `true` | -| gpt-4-32k
ID: | `true` | `true` | -| gpt-3.5-turbo-0125
ID: | `true` | `true` | -| gpt-3.5-turbo-1106
ID: | `true` | `true` | -| gpt-3.5-turbo
ID: | `true` | `true` | -| gpt-3.5-turbo-16k
ID: | `true` | `true` | - -### Google - -| Model | Parallel Tool Call Support | Tool Choice Support | -|--------------------------------------------------------------------------------------|----------|--------| -| gemini-1.5-pro
ID: | `true` | `true`| -| gemini-1.5-flash
ID: | `true` | `true`| -| gemini-1.5-flash-8b
ID: | `true` | `true`| -| gemini-1.0-pro
ID: | `false` | `false` | - -### Anthropic - -| Model | Parallel Tool Call Support | Tool Choice Support | -|------------------------------------------------------------------------------------------------------|-----------|-----------| -| claude-3.5-sonnet-latest
ID: | `true` | `true` | -| claude-3.5-sonnet-20240620
ID: | `true` | `true` | -| claude-3-opus
ID: | `true` | `true` | -| claude-3-sonnet
ID: | `true` | `true` | -| claude-3-haiku
ID: | `true` | `true` | - -### Together AI - -| Model | Parallel Tool Call Support | Tool Choice Support | -|---------------------------------------------------------------------------------------------------------------------------|----------|------------| -| Llama-3.1-405B-Instruct-Turbo
ID: | `false` | `true` | -| Llama-3.1-70B-Instruct-Turbo
ID: | `false` | `true` | -| Llama-3.1-8B-Instruct-Turbo
ID: | `false` | `true` | -| 7B-Instruct-v0.1
ID: | `false` | `true` | -| Mixtral-8x7B-Instruct-v0.1
ID: | `false` | `true` | - - ## Deprecated Models The following models are deprecated and no longer available for use in pipes. It is recommended to switch to a supported model. diff --git a/apps/baseai.dev/content/docs/guides/memory-from-git.mdx b/apps/baseai.dev/content/docs/guides/memory-from-git.mdx index 8023709a..4361a838 100644 --- a/apps/baseai.dev/content/docs/guides/memory-from-git.mdx +++ b/apps/baseai.dev/content/docs/guides/memory-from-git.mdx @@ -8,7 +8,7 @@ tags: - langbase section: 'Memory' published: 2024-10-08 -modified: 2024-11-26 +modified: 2024-10-08 --- # Create a Memory from git Repository @@ -34,37 +34,27 @@ It will also prompt you if you want to create a memory from the current project Do you want to create memory from current project git repository? (yes/no) yes ``` -It will create a memory at `baseai/memory/chat-with-repo` and track files in the current git repository. It prints the path of the memory created. +## Step #3 Provide directory -Open that file in your editor, it looks like this: +Next, it will ask you which directory or subdirectory you want to use for the memory. You can select the current directory or any subdirectory. -```ts -import {MemoryI} from '@baseai/core'; +``` +Enter the path to the directory to track (relative to current directory): +``` -const chatWithRepoMemory = (): MemoryI => ({ - name: 'chat-with-repo', - description: "My list of docs as memory for an AI agent pipe", - git: { - enabled: true, - include: ['**/*'], - gitignore: true, - deployedAt: '', - embeddedAt: '' - } -}); +Provide the path relative to the root of the project directory that you want to use for the memory. E.g., `src/content/docs`, to use the `docs` directory in the `src/content` directory. -export default chatWithRepoMemory; -``` +## Step #4 Provide file extensions -Below is the explanation of the fields in the memory file: +Next, it will ask you which files extensions you want to track. You can provide a comma-separated list of file extensions. E.g., `.mdx,.md` to track markdown files. Alternatively, you can provide `*` to track all files. -- `enabled`: Set to `true` to enable tracking of git repository. -- `include`: Follows glob pattern to include files from the git repository. You can change the pattern to include only specific files or directories. -- `gitignore`: Set to `true` to include `.gitignore` file in the memory. -- `deployedAt`: Set to the commit hash where the memory was last deployed. It is used to track the changes in the memory for deployment. Try to avoid changing this field manually. -- `embeddedAt`: Set to the commit hash where the memory was last embedded. It is used to track the changes in the memory for local development. Try to avoid changing this field manually. +``` +Enter file extensions to track (use * for all, or comma-separated list, e.g., .md,.mdx) +``` -## Step #3 Deploy the memory +That's it! It creates a memory at `baseai/memory/chat-with-repo` in your current directory that tracks the git repository directory and file extensions you provided. + +## Step #5 Deploy the memory Commit all the changes to git and deploy. @@ -72,13 +62,12 @@ Commit all the changes to git and deploy. npx baseai@latest deploy -m chat-with-repo ``` ---- +Next time you want to update the memory with the latest changes from the git repository, you can run the `deploy` command again. Make sure to commit all the changes before deploying. -## Tracking changes from Git Repository +--- -That's it! Next time you make changes to the git repository, you can run the `deploy` command again to update the memory. Make sure to commit all the changes before deploying. +## Running the memory locally -Similarly, if you are using memory locally, make sure to `embed` the memory again after commit before running the AI agent pipe. As a result, it automatically updates the memory with the latest changes and record the hashes in the memory file. +You can embed the memory locally using the `embed` command. Just like any other memory and use it with a Pipe. Follow the [quickstart guide](/docs/memory/quickstart) to see how to embed and use the memory. --- - diff --git a/apps/baseai.dev/content/docs/tools/faqs.mdx b/apps/baseai.dev/content/docs/tools/faqs.mdx index ffda7df1..22411ad1 100644 --- a/apps/baseai.dev/content/docs/tools/faqs.mdx +++ b/apps/baseai.dev/content/docs/tools/faqs.mdx @@ -44,31 +44,9 @@ You can learn more about it [here](/docs/tool/quickstart). --- -## What providers in BaseAI support tool calling? +## What models in BaseAI support tool calling? -We support tool calling for the following providerss: - -### OpenAI models - -We support tool calling in all models provided by OpenAI. - -### Anthropic models - -We support tool calling in all models provided by Anthropic. However, it is in beta at the moment. - -### Google - -We support tool calling in all models provided by Google. However, it is in beta at the moment. - -### Together AI - -We support tool calling in the following models provided by Together AI. However, it is in beta at the moment. - -- meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo -- meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo -- meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo -- mistralai/Mistral-7B-Instruct-v0.1 -- mistralai/Mixtral-8x7B-Instruct-v0.1 +Currently all the OpenAI models like GPT-3, GPT-4, etc., support tool calling in BaseAI. --- diff --git a/apps/baseai.dev/next.config.mjs b/apps/baseai.dev/next.config.mjs index 9564050d..fc785992 100644 --- a/apps/baseai.dev/next.config.mjs +++ b/apps/baseai.dev/next.config.mjs @@ -7,7 +7,6 @@ const nextConfig = { images: { domains: ['raw.githubusercontent.com/'] }, - transpilePackages: ['next-mdx-remote'], async redirects() { return []; } diff --git a/apps/baseai.dev/package.json b/apps/baseai.dev/package.json index c400ce7e..3a6c7e23 100644 --- a/apps/baseai.dev/package.json +++ b/apps/baseai.dev/package.json @@ -41,12 +41,11 @@ "flexsearch": "^0.7.31", "framer-motion": "^10.18.0", "gray-matter": "^4.0.3", - "html2canvas": "^1.4.1", "lucide-react": "^0.378.0", "mdast-util-to-string": "^4.0.0", "mdx-annotations": "^0.1.1", "mxcn": "^2.0.0", - "next": "14.2.35", + "next": "^14.0.4", "next-mdx-remote": "^5.0.0", "next-themes": "^0.2.1", "react": "^18.2.0", @@ -62,6 +61,7 @@ "tailwindcss": "^3.4.1", "tailwindcss-animate": "^1.0.7", "three": "^0.168.0", + "html2canvas": "^1.4.1", "typescript": "^5.3.3", "unist-util-filter": "^5.0.1", "unist-util-visit": "^5.0.0", diff --git a/apps/baseai.dev/public/favicon/2024/android-chrome-192x192.png b/apps/baseai.dev/public/favicon/2024/android-chrome-192x192.png deleted file mode 100644 index ed7c8c99..00000000 Binary files a/apps/baseai.dev/public/favicon/2024/android-chrome-192x192.png and /dev/null differ diff --git a/apps/baseai.dev/public/favicon/2024/android-chrome-512x512.png b/apps/baseai.dev/public/favicon/2024/android-chrome-512x512.png deleted file mode 100644 index 2de91b20..00000000 Binary files a/apps/baseai.dev/public/favicon/2024/android-chrome-512x512.png and /dev/null differ diff --git a/apps/baseai.dev/public/favicon/2024/apple-touch-icon.png b/apps/baseai.dev/public/favicon/2024/apple-touch-icon.png deleted file mode 100644 index f3607b30..00000000 Binary files a/apps/baseai.dev/public/favicon/2024/apple-touch-icon.png and /dev/null differ diff --git a/apps/baseai.dev/public/favicon/2024/browserconfig.xml b/apps/baseai.dev/public/favicon/2024/browserconfig.xml deleted file mode 100644 index b9639caf..00000000 --- a/apps/baseai.dev/public/favicon/2024/browserconfig.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - #000000 - - - diff --git a/apps/baseai.dev/public/favicon/2024/favicon-16x16.png b/apps/baseai.dev/public/favicon/2024/favicon-16x16.png deleted file mode 100644 index d96c6e05..00000000 Binary files a/apps/baseai.dev/public/favicon/2024/favicon-16x16.png and /dev/null differ diff --git a/apps/baseai.dev/public/favicon/2024/favicon-32x32.png b/apps/baseai.dev/public/favicon/2024/favicon-32x32.png deleted file mode 100644 index 2afa3606..00000000 Binary files a/apps/baseai.dev/public/favicon/2024/favicon-32x32.png and /dev/null differ diff --git a/apps/baseai.dev/public/favicon/2024/favicon.ico b/apps/baseai.dev/public/favicon/2024/favicon.ico deleted file mode 100644 index 26fbba19..00000000 Binary files a/apps/baseai.dev/public/favicon/2024/favicon.ico and /dev/null differ diff --git a/apps/baseai.dev/public/favicon/2024/mstile-144x144.png b/apps/baseai.dev/public/favicon/2024/mstile-144x144.png deleted file mode 100644 index 055941f8..00000000 Binary files a/apps/baseai.dev/public/favicon/2024/mstile-144x144.png and /dev/null differ diff --git a/apps/baseai.dev/public/favicon/2024/mstile-150x150.png b/apps/baseai.dev/public/favicon/2024/mstile-150x150.png deleted file mode 100644 index 8f748f87..00000000 Binary files a/apps/baseai.dev/public/favicon/2024/mstile-150x150.png and /dev/null differ diff --git a/apps/baseai.dev/public/favicon/2024/mstile-310x150.png b/apps/baseai.dev/public/favicon/2024/mstile-310x150.png deleted file mode 100644 index 05bd230f..00000000 Binary files a/apps/baseai.dev/public/favicon/2024/mstile-310x150.png and /dev/null differ diff --git a/apps/baseai.dev/public/favicon/2024/mstile-310x310.png b/apps/baseai.dev/public/favicon/2024/mstile-310x310.png deleted file mode 100644 index f493e2ca..00000000 Binary files a/apps/baseai.dev/public/favicon/2024/mstile-310x310.png and /dev/null differ diff --git a/apps/baseai.dev/public/favicon/2024/mstile-70x70.png b/apps/baseai.dev/public/favicon/2024/mstile-70x70.png deleted file mode 100644 index 46fab254..00000000 Binary files a/apps/baseai.dev/public/favicon/2024/mstile-70x70.png and /dev/null differ diff --git a/apps/baseai.dev/public/favicon/2024/safari-pinned-tab.svg b/apps/baseai.dev/public/favicon/2024/safari-pinned-tab.svg deleted file mode 100644 index 8bb66010..00000000 --- a/apps/baseai.dev/public/favicon/2024/safari-pinned-tab.svg +++ /dev/null @@ -1,42 +0,0 @@ - - - - -Created by potrace 1.14, written by Peter Selinger 2001-2017 - - - - - - - - - - diff --git a/apps/baseai.dev/public/favicon/2024/site.webmanifest b/apps/baseai.dev/public/favicon/2024/site.webmanifest deleted file mode 100644 index 1b51ab61..00000000 --- a/apps/baseai.dev/public/favicon/2024/site.webmanifest +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "LANGBASE", - "short_name": "LANGBASE", - "icons": [ - { - "src": "/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/android-chrome-512x512.png", - "sizes": "512x512", - "type": "image/png" - } - ], - "theme_color": "#000000", - "background_color": "#000000", - "display": "standalone" -} diff --git a/apps/baseai.dev/public/favicon/old/android-chrome-192x192.png b/apps/baseai.dev/public/favicon/old/android-chrome-192x192.png deleted file mode 100644 index 1131a116..00000000 Binary files a/apps/baseai.dev/public/favicon/old/android-chrome-192x192.png and /dev/null differ diff --git a/apps/baseai.dev/public/favicon/old/android-chrome-512x512.png b/apps/baseai.dev/public/favicon/old/android-chrome-512x512.png deleted file mode 100644 index b953c267..00000000 Binary files a/apps/baseai.dev/public/favicon/old/android-chrome-512x512.png and /dev/null differ diff --git a/apps/baseai.dev/public/favicon/old/apple-touch-icon.png b/apps/baseai.dev/public/favicon/old/apple-touch-icon.png deleted file mode 100644 index 819ab604..00000000 Binary files a/apps/baseai.dev/public/favicon/old/apple-touch-icon.png and /dev/null differ diff --git a/apps/baseai.dev/public/favicon/old/browserconfig.xml b/apps/baseai.dev/public/favicon/old/browserconfig.xml deleted file mode 100644 index b9639caf..00000000 --- a/apps/baseai.dev/public/favicon/old/browserconfig.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - #000000 - - - diff --git a/apps/baseai.dev/public/favicon/old/favicon-16x16.png b/apps/baseai.dev/public/favicon/old/favicon-16x16.png deleted file mode 100644 index abd1f229..00000000 Binary files a/apps/baseai.dev/public/favicon/old/favicon-16x16.png and /dev/null differ diff --git a/apps/baseai.dev/public/favicon/old/favicon-32x32.png b/apps/baseai.dev/public/favicon/old/favicon-32x32.png deleted file mode 100644 index 3f8fe83c..00000000 Binary files a/apps/baseai.dev/public/favicon/old/favicon-32x32.png and /dev/null differ diff --git a/apps/baseai.dev/public/favicon/old/favicon.ico b/apps/baseai.dev/public/favicon/old/favicon.ico deleted file mode 100644 index 7c6d4a8a..00000000 Binary files a/apps/baseai.dev/public/favicon/old/favicon.ico and /dev/null differ diff --git a/apps/baseai.dev/public/favicon/old/mstile-150x150.png b/apps/baseai.dev/public/favicon/old/mstile-150x150.png deleted file mode 100644 index edd66071..00000000 Binary files a/apps/baseai.dev/public/favicon/old/mstile-150x150.png and /dev/null differ diff --git a/apps/baseai.dev/public/favicon/old/safari-pinned-tab.svg b/apps/baseai.dev/public/favicon/old/safari-pinned-tab.svg deleted file mode 100644 index 030832dd..00000000 --- a/apps/baseai.dev/public/favicon/old/safari-pinned-tab.svg +++ /dev/null @@ -1,46 +0,0 @@ - - - - -Created by potrace 1.14, written by Peter Selinger 2001-2017 - - - - - - - - - - diff --git a/apps/baseai.dev/public/favicon/old/site.webmanifest b/apps/baseai.dev/public/favicon/old/site.webmanifest deleted file mode 100644 index 30ca3c44..00000000 --- a/apps/baseai.dev/public/favicon/old/site.webmanifest +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "Langbase.com", - "short_name": "Langbase.com", - "icons": [ - { - "src": "/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/android-chrome-512x512.png", - "sizes": "512x512", - "type": "image/png" - } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone" -} diff --git a/apps/baseai.dev/public/favicon/svg-black/favicon.png b/apps/baseai.dev/public/favicon/svg-black/favicon.png deleted file mode 100644 index 0bd8dd5f..00000000 Binary files a/apps/baseai.dev/public/favicon/svg-black/favicon.png and /dev/null differ diff --git a/apps/baseai.dev/public/favicon/svg-black/favicon.svg b/apps/baseai.dev/public/favicon/svg-black/favicon.svg deleted file mode 100644 index c31c3778..00000000 --- a/apps/baseai.dev/public/favicon/svg-black/favicon.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/apps/baseai.dev/public/favicon/svg-white/favicon.png b/apps/baseai.dev/public/favicon/svg-white/favicon.png deleted file mode 100644 index 535f661e..00000000 Binary files a/apps/baseai.dev/public/favicon/svg-white/favicon.png and /dev/null differ diff --git a/apps/baseai.dev/public/favicon/svg-white/favicon.svg b/apps/baseai.dev/public/favicon/svg-white/favicon.svg deleted file mode 100644 index e02b9289..00000000 --- a/apps/baseai.dev/public/favicon/svg-white/favicon.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/apps/baseai.dev/src/app/layout.tsx b/apps/baseai.dev/src/app/layout.tsx index f2542e5d..d0166555 100644 --- a/apps/baseai.dev/src/app/layout.tsx +++ b/apps/baseai.dev/src/app/layout.tsx @@ -1,5 +1,4 @@ import { Providers } from '@/app/providers'; -import SupportButton from '@/components/support-button'; import '@/styles/tailwind.css'; import { Inter } from 'next/font/google'; const inter = Inter({ subsets: ['latin'] }); @@ -14,9 +13,7 @@ export async function generateMetadata() { openGraph: { title: 'BaseAI - The first Web AI Framework', description: `BaseAI is the first web AI framework. Deployable with Langbase the composable serverless AI cloud. Built with a focus on simplicity and composability. Helping developers build AI agents with memory (RAG), and deploy serverless. It's composable by design and offers a simple API to build and deploy any AI agents (AI features).`, - images: [ - 'https://raw.githubusercontent.com/LangbaseInc/docs-images/refs/heads/main/baseai/baseai-ogg.jpg' - ], + images: ['https://raw.githubusercontent.com/LangbaseInc/docs-images/refs/heads/main/baseai/baseai-ogg.jpg'], siteName: 'BaseAI' }, twitter: { @@ -24,9 +21,7 @@ export async function generateMetadata() { title: 'BaseAI - The first Web AI Framework', creator: '@LangbaseInc', description: `BaseAI is the first web AI framework. Deployable with Langbase the composable serverless AI cloud. Built with a focus on simplicity and composability. Helping developers build AI agents with memory (RAG), and deploy serverless. It's composable by design and offers a simple API to build and deploy any AI agents (AI features).`, - images: [ - 'https://raw.githubusercontent.com/LangbaseInc/docs-images/refs/heads/main/baseai/baseai-ogg.jpg' - ] + images: ['https://raw.githubusercontent.com/LangbaseInc/docs-images/refs/heads/main/baseai/baseai-ogg.jpg'] }, authors: [{ name: 'Langbase, Inc.' }], robots: { @@ -34,7 +29,7 @@ export async function generateMetadata() { follow: true, googleBot: { index: true, - follow: true + follow: true, } }, keywords: 'BaseAI, Web AI framework', @@ -52,10 +47,7 @@ export default async function RootLayout({ return ( - - - {children} - + {children} ); diff --git a/apps/baseai.dev/src/components/home/hero.tsx b/apps/baseai.dev/src/components/home/hero.tsx index 0d2978ae..74b04cc1 100644 --- a/apps/baseai.dev/src/components/home/hero.tsx +++ b/apps/baseai.dev/src/components/home/hero.tsx @@ -10,10 +10,10 @@ 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 +23,7 @@ export default function Hero({ }) { function Content() { return ( -
+
@@ -45,15 +45,15 @@ function Content() {
- BaseAI + Base AI The first Web AI Framework. @@ -245,4 +245,4 @@ function CopyableCommand({ command }: CopyableCommandProps) {
); -} \ No newline at end of file +} diff --git a/apps/baseai.dev/src/components/home/webgl.tsx b/apps/baseai.dev/src/components/home/webgl.tsx index c6d649ee..9b3099e9 100644 --- a/apps/baseai.dev/src/components/home/webgl.tsx +++ b/apps/baseai.dev/src/components/home/webgl.tsx @@ -29,6 +29,21 @@ const WebGLInitializer = () => { canvas.width = window.innerWidth; canvas.height = window.innerHeight; + // const fontFace = new FontFace( + // 'Grotesk', + // 'url(/AlteHaasGroteskBold.ttf)' + // ); + // document.fonts.add(fontFace); + + // const style = document.createElement('style'); + // style.innerHTML = ` + // @import url(/AlteHaasGroteskBold.ttf); + // body { + // font-family: 'Grotesk', sans-serif; + // } + // `; + // document.head.appendChild(style); + const textDiv = document.createElement('div'); textDiv.style.position = 'absolute'; textDiv.style.left = '0'; @@ -39,6 +54,7 @@ const WebGLInitializer = () => { textDiv.style.fontFamily = 'Grotesk'; textDiv.style.color = 'rgba(255,255,255,1)'; textDiv.style.display = 'flex'; + // textDiv.style.lineHeight = '0px'; textDiv.style.justifyContent = 'center'; textDiv.style.alignItems = 'center'; textDiv.textContent = 'BASE AI'; @@ -57,7 +73,7 @@ const WebGLInitializer = () => { await document.fonts.ready; document.body.appendChild(textDiv); - const lineHeight = window.getComputedStyle(textDiv).lineHeight; + const lineHeight = window.getComputedStyle(textDiv).lineHeight; // e.g., "20px" const y = parseFloat(lineHeight); const canvas = await html2canvas(textDiv, { @@ -68,6 +84,7 @@ const WebGLInitializer = () => { logging: false, y: y * 0, x: 0, + // foreignObjectRendering: true, onclone: document => { Array.from(document.querySelectorAll('*')).forEach(e => { let existingStyle = e.getAttribute('style') || ''; @@ -116,6 +133,7 @@ const WebGLInitializer = () => { } ); + // Custom shader material for the enhanced liquid wavy effect const material = new THREE.ShaderMaterial({ transparent: true, uniforms: { @@ -391,6 +409,7 @@ const WebGLInitializer = () => { ` }); + // Create a mesh with the geometry and material const sphere = new THREE.Mesh(geometry, material); scene.add(sphere); @@ -399,7 +418,7 @@ const WebGLInitializer = () => { function calculateCameraZ(screenWidth: number, screenHeight: number) { let cameraZ; - + // Breakpoints based on screen width and height if (screenWidth <= 768) { if (screen.availWidth < screen.availHeight) { cameraZ = 4.5; @@ -408,41 +427,46 @@ const WebGLInitializer = () => { } } else if (screenWidth > 768 && screenWidth <= 1920) { if (screenHeight <= 1080) { - cameraZ = 2; + cameraZ = 2; // Full HD screens (1920x1080) } else { - cameraZ = 1.9; + cameraZ = 1.9; // Higher aspect ratio or larger height } } else if (screenWidth > 1920 && screenWidth <= 2440) { if (screenHeight <= 1080) { - cameraZ = 1.75; + cameraZ = 1.75; // Wide screens with Full HD height } else { - cameraZ = 1.65; + cameraZ = 1.65; // Taller screens with higher resolutions } } else if (screenWidth > 2440) { if (screenHeight <= 1440) { - cameraZ = 1.5; + cameraZ = 1.5; // Ultra-wide or larger 2K displays } else { - cameraZ = 1.4; + cameraZ = 1.4; // 4K and above } } return cameraZ; } + // Get screen width and height const screenWidth = window.innerWidth; const screenHeight = window.innerHeight; + // Calculate camera Z position based on breakpoints const cameraZ = calculateCameraZ(screenWidth, screenHeight); if (cameraZ) camera.position.z = cameraZ; + // Raycaster setup const raycaster = new THREE.Raycaster(); const mouse = new THREE.Vector2(); + // Animation loop const animate = () => { requestAnimationFrame(animate); - material.uniforms.u_time.value += 0.02; + material.uniforms.u_time.value += 0.02; // Update time for animation material.uniforms.u_viewVector.value = camera.position; + // Update mouse position in the shader raycaster.setFromCamera(mouse, camera); const intersects = raycaster.intersectObject(sphere); if (intersects.length > 0) { @@ -477,6 +501,13 @@ const WebGLInitializer = () => { updateCameraPosition(); + // Update background texture with new dimensions + createHighResBackgroundTexture(width, height).then(texture => { + scene.background = texture; + if (material.uniforms && material.uniforms.u_background) { + material.uniforms.u_background.value = texture; + } + }); createHighResBackgroundTexture(width, height).then(texture => { scene.background = texture; if (material.uniforms && material.uniforms.u_background) { @@ -498,4 +529,4 @@ const WebGLInitializer = () => { return
; }; -export default WebGLInitializer; \ No newline at end of file +export default WebGLInitializer; diff --git a/apps/baseai.dev/src/components/mdx/InlineCodeCopy.tsx b/apps/baseai.dev/src/components/mdx/InlineCodeCopy.tsx index a39ba5e1..6cfd7f7e 100644 --- a/apps/baseai.dev/src/components/mdx/InlineCodeCopy.tsx +++ b/apps/baseai.dev/src/components/mdx/InlineCodeCopy.tsx @@ -6,7 +6,6 @@ import { } from '@heroicons/react/24/solid'; import { Button } from '../ui/button'; import { useCopyToClipboard } from '@/hooks/use-copy-to-clipboard'; -import cn from 'mxcn'; export function InlineCopy({ content, @@ -16,7 +15,6 @@ export function InlineCopy({ children: React.ReactNode; }) { const { isCopied, copyToClipboard } = useCopyToClipboard({ timeout: 2000 }); - const totalChars = content.length; const onCopy = () => { navigator.clipboard.writeText(content); @@ -26,7 +24,7 @@ export function InlineCopy({ return ( - 25 && 'w-[50%] sm:w-full overflow-scroll')}>{content} + {content}