Compare commits

..

47 Commits

Author SHA1 Message Date
github-actions[bot] 14792cd8b4 Release 0.8.12 (#1473)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-12 16:20:25 -08:00
Alex Yang 7ae6eaa0a2 chore: update changeset 2024-11-12 12:49:17 -08:00
Alex Yang dbb5bd9f23 feat: allow tool_choice for OpenAIAgent (#1472) 2024-11-12 12:46:57 -08:00
github-actions[bot] aacd606204 Release 0.8.11 (#1471)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-12 11:49:22 -08:00
Alex Yang f865c984d3 feat: async get message on chat store (#1470) 2024-11-12 10:59:44 -08:00
github-actions[bot] 7b10882d06 Release 0.8.10 (#1466)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: himself65 <himself65@users.noreply.github.com>
2024-11-11 14:19:46 -08:00
Alex Yang f066e50482 feat: vllm support (#1468) 2024-11-11 13:14:08 -08:00
Alex Yang fd8c882792 refactor: migrate example to new workflow API (#1467) 2024-11-11 12:03:38 -08:00
Alex Yang d89ebe0261 chore: update changeset 2024-11-11 10:11:04 -08:00
Alex Yang 968feb32cd feat: better input type for function tool with zod (#1464) 2024-11-11 10:10:03 -08:00
Alex Yang 43f6f56c5b docs(next): fix turbo.json (#1465) 2024-11-11 10:07:12 -08:00
github-actions[bot] b2364dc5ba Release 0.8.9 (#1460)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-10 23:32:41 -08:00
Alex Yang 67f4db8501 fix: steaming chat in ollama (#1463) 2024-11-10 23:27:09 -08:00
Alex Yang e4151a8b02 feat: support ollama agent (#1462) 2024-11-10 22:38:40 -08:00
Alex Yang 4d4cd8ac6b feat: support ollama tool call (#1461) 2024-11-10 20:46:46 -08:00
Alex Yang 4fc001c8de chore: bump @huggingface/transformers (#1459) 2024-11-10 20:14:44 -08:00
Alex Yang cf675bdc7a chore: bump version (#1458) 2024-11-10 16:43:45 -08:00
github-actions[bot] 660b831b9e Release 0.8.8 (#1457)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: himself65 <himself65@users.noreply.github.com>
2024-11-08 23:56:46 -08:00
Alex Yang ad85bd0b46 fix: agent streaming final message & async local storage (#1456) 2024-11-08 22:54:13 -08:00
Alex Yang 18ec1f2f61 chore: separate tokenizers (#1454) 2024-11-08 18:53:05 -08:00
Alex Yang b0fbd8b5c8 docs: update CONTRIBUTING.md (#1455) 2024-11-08 18:38:26 -08:00
github-actions[bot] c0dfc8c641 Release 0.8.7 (#1453)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-08 17:57:02 -08:00
Alex Yang a8d3fa68a1 fix: exports in package.json (#1452) 2024-11-08 16:51:21 -08:00
github-actions[bot] f9470c470a Release 0.8.6 (#1450)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-08 14:57:13 -08:00
Alex Yang 95a5cc6ee1 refactor: move storage into core (#1451) 2024-11-08 14:29:08 -08:00
Peter Goldstein 487782cd98 fix: add missing inference endpoints for the Haiku 3.5 models (#1448) 2024-11-07 20:12:34 -08:00
Alex Yang 58e65d399e refactor: move e2e top level (#1449) 2024-11-07 20:11:15 -08:00
github-actions[bot] fdad3d66ac Release 0.8.5 (#1446)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-07 15:57:54 -08:00
Rozstone a6db5dd29b feat: add baseUrl and timeout option in cohere rerank (#1445)
Co-authored-by: Alex Yang <himself65@outlook.com>
2024-11-07 15:13:13 -08:00
Laurie Voss 7b684c4480 docs: home page tweaks (#1447) 2024-11-07 15:12:54 -08:00
Alex Yang c66868a98a chore: fix turbo cache 2024-11-07 15:05:41 -08:00
Alex Yang 14cc9ebe59 chore: move multi-model into single sub module (#1443) 2024-11-07 15:01:17 -08:00
Aman Rao 396b1e1474 feat: integrate with azure cosmos db (#1444)
Co-authored-by: Wassim Chegham <github@wassim.dev>
Co-authored-by: Alex Yang <himself65@outlook.com>
2024-11-07 14:43:19 -08:00
github-actions[bot] 69f3095424 Release (#1438)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-07 14:30:26 -08:00
Alex Yang dc8bd5ea92 chore: delete .changeset/fresh-dancers-refuse.md 2024-11-07 09:49:54 -08:00
Marcus Schiesser 4af9a77d8b feat: add example using chat-ui components to docs (#1436)
Co-authored-by: Alex Yang <himself65@outlook.com>
2024-11-07 09:44:47 -08:00
Alex Yang 9c1d094455 docs: fix upload llamacloud script 2024-11-07 09:35:30 -08:00
Alex Yang 0a8e3fdbcd docs(next): fix build (#1441) 2024-11-06 15:23:42 -08:00
Alex Yang 1c0e0e1e1d chore: bump version (#1439) 2024-11-06 10:16:18 -08:00
Parham Saidi 47a7c3ea15 feat: added Haiku 3.5 support via Bedrock (#1437) 2024-11-05 13:03:10 -08:00
Alex Yang 898cff0d6a chore: bump pnpm (#1435) 2024-11-04 20:50:15 -08:00
Alex Yang 9df37edef4 fix: remove usage of pnpx (#1434) 2024-11-04 20:38:08 -08:00
github-actions[bot] f86a7a4fa3 Release 0.8.4 (#1432)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-04 14:51:57 -08:00
Aman Rao 35430d3609 feat: add AzureCosmosDBNoSqlVectorStore and SimpleCosmosDBReader (#1331)
Co-authored-by: Alex Yang <himself65@outlook.com>
2024-11-04 13:39:39 -08:00
Alex Yang 3c162b2b4a docs: direct to legacy docs (#1431) 2024-11-04 09:54:54 -08:00
github-actions[bot] 5bb4531245 Release 0.8.3 (#1427)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-02 19:05:28 -07:00
Alex Yang 2ff0a89891 fix: expose @llamaindex/node-parser (#1426) 2024-11-02 18:57:05 -07:00
377 changed files with 11870 additions and 5456 deletions
+1 -1
View File
@@ -119,7 +119,7 @@ jobs:
run: pnpm run build run: pnpm run build
- name: Build ${{ matrix.packages }} - name: Build ${{ matrix.packages }}
run: pnpm run build run: pnpm run build
working-directory: packages/llamaindex/e2e/examples/${{ matrix.packages }} working-directory: e2e/examples/${{ matrix.packages }}
typecheck-examples: typecheck-examples:
runs-on: ubuntu-latest runs-on: ubuntu-latest
+34 -62
View File
@@ -2,86 +2,58 @@
## Structure ## Structure
This is a monorepo built with Turborepo LlamaIndex.TS uses pnpm monorepo.
Right now, for first-time contributors, these three packages are of the highest importance: We recommend you to understand the basics of Node.js, TypeScript, pnpm, and of course, LLM before contributing.
- `packages/llamaindex` which is the main NPM library `llamaindex` There are some important folders in the repository:
- `examples` is where the demo code lives
- `apps/docs` is where the code for the documentation of https://ts.llamaindex.ai/ is located
### Turborepo docs - `packages/*`: Contains the source code of the packages. Each package is a separate npm package.
- `llamaindex`: The starter package for LlamaIndex.TS, which contains the all sub-packages.
You can checkout how Turborepo works using the default [README-turborepo.md](/README-turborepo.md) - `core`: The core package of LlamaIndex.TS, which contains the abstract classes and interfaces. It is designed for
all JS runtime environments.
- `env`: The environment package of LlamaIndex.TS, which contains the environment-specific classes and interfaces. It
includes compatibility layers for Node.js, Deno, Vercel Edge Runtime, Cloudflare Workers...
- `apps/*`: The applications based on LlamaIndex.TS.
- `next`: Our documentation website based on Next.js.
- `examples`: The code examples of LlamaIndex.TS using Node.js.
## Getting Started ## Getting Started
Install NodeJS. Preferably v18 using nvm or n. Make sure you have Node.js LIS (Long-term Support) installed. You can check your Node.js version by running:
Inside the LlamaIndexTS directory:
```shell
node -v
# v20.x.x
``` ```
npm i -g pnpm ts-node
### Use pnpm
```shell
corepack enable
```
### Install dependencies
```shell
pnpm install pnpm install
``` ```
Note: we use pnpm in this repo, which has a lot of the same functionality and CLI options as npm but it does do some things better in a monorepo, like centralizing dependencies and caching. ### Build the packages
PNPM's has documentation on its [workspace feature](https://pnpm.io/workspaces) and Turborepo had some [useful documentation also](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks). ```shell
# Build all packages
### Running Typescript turbo build --filter "./packages/*"
When we publish to NPM we will have a tsc compiled version of the library in JS. For now, the easiest thing to do is use ts-node.
### Test cases
To run them, run
```
pnpm run test
```
To write new test cases write them in [packages/llamaindex/tests](/packages/llamaindex/tests)
We use Vitest https://vitest.dev to write our test cases. Vitest comes with a bunch of built-in assertions using the expect function: https://vitest.dev/api/expect.html#expect
### Demo applications
There is an existing ["example"](/examples/README.md) demos folder with mainly NodeJS scripts. Feel free to add additional demos to that folder. If you would like to try out your changes in the `llamaindex` package with a new demo, you need to run the build command in the README.
You can create new demo applications in the apps folder. Just run pnpm init in the folder after you create it to create its own package.json
### Installing packages
To install packages for a specific package or demo application, run
```
pnpm add [NPM Package] --filter [package or application i.e. llamaindex or docs]
```
To install packages for every package or application run
```
pnpm add -w [NPM Package]
``` ```
### Docs ### Docs
To contribute to the docs, go to the docs website folder and run the Docusaurus instance. See the [docs](./apps/next/README.md) for more information.
```bash
cd apps/docs
pnpm install
pnpm start
```
That should start a webserver which will serve the docs on https://localhost:3000
Any changes you make should be reflected in the browser. If you need to regenerate the API docs and find that your TSDoc isn't getting the updates, feel free to remove apps/docs/api. It will automatically regenerate itself when you run pnpm start again.
## Changeset ## Changeset
We use [changesets](https://github.com/changesets/changesets) for managing versions and changelogs. To create a new changeset, run in the root folder: We use [changesets](https://github.com/changesets/changesets) for managing versions and changelogs. To create a new
changeset, run in the root folder:
``` ```
pnpm changeset pnpm changeset
@@ -95,6 +67,6 @@ The [Release Github Action](.github/workflows/release.yml) is automatically gene
PR called "Release {version}". PR called "Release {version}".
This PR will update the `package.json` and `CHANGELOG.md` files of each package according to This PR will update the `package.json` and `CHANGELOG.md` files of each package according to
the current changesets in the [.changeset](.changeset/) folder. the current changesets in the [.changeset](.changeset) folder.
If this PR is merged it will automatically add version tags to the repository and publish the updated packages to NPM. If this PR is merged it will automatically add version tags to the repository and publish the updated packages to NPM.
+71
View File
@@ -1,5 +1,76 @@
# docs # docs
## 0.0.116
### Patch Changes
- llamaindex@0.8.12
## 0.0.115
### Patch Changes
- llamaindex@0.8.11
## 0.0.114
### Patch Changes
- Updated dependencies [f066e50]
- llamaindex@0.8.10
- @llamaindex/examples@0.0.14
## 0.0.113
### Patch Changes
- Updated dependencies [4fc001c]
- Updated dependencies [4d4cd8a]
- llamaindex@0.8.9
## 0.0.112
### Patch Changes
- Updated dependencies [ad85bd0]
- llamaindex@0.8.8
- @llamaindex/examples@0.0.13
## 0.0.111
### Patch Changes
- llamaindex@0.8.7
## 0.0.110
### Patch Changes
- Updated dependencies [95a5cc6]
- llamaindex@0.8.6
## 0.0.109
### Patch Changes
- Updated dependencies [14cc9eb]
- Updated dependencies [a6db5dd]
- Updated dependencies [396b1e1]
- llamaindex@0.8.5
## 0.0.108
### Patch Changes
- Updated dependencies [35430d3]
- llamaindex@0.8.4
## 0.0.107
### Patch Changes
- llamaindex@0.8.3
## 0.0.106 ## 0.0.106
### Patch Changes ### Patch Changes
@@ -25,6 +25,7 @@ ANTHROPIC_CLAUDE_3_SONNET = "anthropic.claude-3-sonnet-20240229-v1:0";
ANTHROPIC_CLAUDE_3_HAIKU = "anthropic.claude-3-haiku-20240307-v1:0"; ANTHROPIC_CLAUDE_3_HAIKU = "anthropic.claude-3-haiku-20240307-v1:0";
ANTHROPIC_CLAUDE_3_OPUS = "anthropic.claude-3-opus-20240229-v1:0"; // available on us-west-2 ANTHROPIC_CLAUDE_3_OPUS = "anthropic.claude-3-opus-20240229-v1:0"; // available on us-west-2
ANTHROPIC_CLAUDE_3_5_SONNET = "anthropic.claude-3-5-sonnet-20240620-v1:0"; ANTHROPIC_CLAUDE_3_5_SONNET = "anthropic.claude-3-5-sonnet-20240620-v1:0";
ANTHROPIC_CLAUDE_3_5_HAIKU = "anthropic.claude-3-5-haiku-20241022-v1:0";
META_LLAMA2_13B_CHAT = "meta.llama2-13b-chat-v1"; META_LLAMA2_13B_CHAT = "meta.llama2-13b-chat-v1";
META_LLAMA2_70B_CHAT = "meta.llama2-70b-chat-v1"; META_LLAMA2_70B_CHAT = "meta.llama2-70b-chat-v1";
META_LLAMA3_8B_INSTRUCT = "meta.llama3-8b-instruct-v1:0"; META_LLAMA3_8B_INSTRUCT = "meta.llama3-8b-instruct-v1:0";
+17 -17
View File
@@ -1,6 +1,6 @@
{ {
"name": "docs", "name": "docs",
"version": "0.0.106", "version": "0.0.116",
"private": true, "private": true,
"scripts": { "scripts": {
"docusaurus": "docusaurus", "docusaurus": "docusaurus",
@@ -15,29 +15,29 @@
"typecheck": "tsc" "typecheck": "tsc"
}, },
"dependencies": { "dependencies": {
"@docusaurus/core": "3.5.2", "@docusaurus/core": "3.6.0",
"@docusaurus/remark-plugin-npm2yarn": "3.5.2", "@docusaurus/remark-plugin-npm2yarn": "3.6.0",
"@llamaindex/examples": "workspace:*", "@llamaindex/examples": "workspace:*",
"@mdx-js/react": "3.0.1", "@mdx-js/react": "^3.1.0",
"clsx": "2.1.1", "clsx": "^2.1.1",
"llamaindex": "workspace:*", "llamaindex": "workspace:*",
"postcss": "8.4.41", "postcss": "^8.4.47",
"prism-react-renderer": "2.4.0", "prism-react-renderer": "^2.4.0",
"raw-loader": "4.0.2", "raw-loader": "^4.0.2",
"react": "18.3.1", "react": "^18.3.1",
"react-dom": "18.3.1" "react-dom": "18.3.1"
}, },
"devDependencies": { "devDependencies": {
"@docusaurus/module-type-aliases": "3.5.2", "@docusaurus/module-type-aliases": "3.6.0",
"@docusaurus/preset-classic": "3.5.2", "@docusaurus/preset-classic": "3.6.0",
"@docusaurus/theme-classic": "3.5.2", "@docusaurus/theme-classic": "3.6.0",
"@docusaurus/types": "3.5.2", "@docusaurus/types": "3.6.0",
"@tsconfig/docusaurus": "2.0.3", "@tsconfig/docusaurus": "2.0.3",
"@types/node": "^22.8.4", "@types/node": "^22.9.0",
"docusaurus-plugin-typedoc": "1.0.5", "docusaurus-plugin-typedoc": "1.0.5",
"typedoc": "0.26.6", "typedoc": "0.26.11",
"typedoc-plugin-markdown": "4.2.6", "typedoc-plugin-markdown": "4.2.10",
"typescript": "^5.6.2" "typescript": "^5.6.3"
}, },
"browserslist": { "browserslist": {
"production": [ "production": [
+1
View File
@@ -29,3 +29,4 @@ next-env.d.ts
# build # build
/src/content/docs/cloud/api /src/content/docs/cloud/api
./types
+119
View File
@@ -1,5 +1,124 @@
# @llamaindex/doc # @llamaindex/doc
## 0.0.14
### Patch Changes
- Updated dependencies [7ae6eaa]
- @llamaindex/core@0.4.9
- @llamaindex/openai@0.1.34
- @llamaindex/cloud@2.0.9
- llamaindex@0.8.12
- @llamaindex/node-parser@0.0.10
- @llamaindex/readers@1.0.10
## 0.0.13
### Patch Changes
- Updated dependencies [f865c98]
- @llamaindex/core@0.4.8
- @llamaindex/cloud@2.0.8
- llamaindex@0.8.11
- @llamaindex/node-parser@0.0.9
- @llamaindex/openai@0.1.33
- @llamaindex/readers@1.0.9
## 0.0.12
### Patch Changes
- Updated dependencies [f066e50]
- Updated dependencies [d89ebe0]
- Updated dependencies [fd8c882]
- Updated dependencies [fd8c882]
- llamaindex@0.8.10
- @llamaindex/core@0.4.7
- @llamaindex/workflow@0.0.4
- @llamaindex/cloud@2.0.7
- @llamaindex/node-parser@0.0.8
- @llamaindex/openai@0.1.32
- @llamaindex/readers@1.0.8
## 0.0.11
### Patch Changes
- Updated dependencies [4fc001c]
- Updated dependencies [4d4cd8a]
- llamaindex@0.8.9
- @llamaindex/cloud@2.0.6
- @llamaindex/core@0.4.6
- @llamaindex/node-parser@0.0.7
- @llamaindex/openai@0.1.31
- @llamaindex/readers@1.0.7
## 0.0.10
### Patch Changes
- Updated dependencies [ad85bd0]
- @llamaindex/core@0.4.5
- llamaindex@0.8.8
- @llamaindex/node-parser@0.0.6
- @llamaindex/workflow@0.0.3
- @llamaindex/cloud@2.0.5
- @llamaindex/openai@0.1.30
- @llamaindex/readers@1.0.6
## 0.0.9
### Patch Changes
- @llamaindex/cloud@2.0.4
- @llamaindex/core@0.4.4
- llamaindex@0.8.7
- @llamaindex/node-parser@0.0.5
- @llamaindex/openai@0.1.29
- @llamaindex/readers@1.0.5
## 0.0.8
### Patch Changes
- Updated dependencies [95a5cc6]
- @llamaindex/core@0.4.3
- llamaindex@0.8.6
- @llamaindex/cloud@2.0.3
- @llamaindex/node-parser@0.0.4
- @llamaindex/openai@0.1.28
- @llamaindex/readers@1.0.4
## 0.0.7
### Patch Changes
- Updated dependencies [14cc9eb]
- Updated dependencies [a6db5dd]
- Updated dependencies [396b1e1]
- llamaindex@0.8.5
- @llamaindex/cloud@2.0.2
- @llamaindex/core@0.4.2
- @llamaindex/node-parser@0.0.3
- @llamaindex/openai@0.1.27
- @llamaindex/readers@1.0.3
## 0.0.6
### Patch Changes
- Updated dependencies [35430d3]
- llamaindex@0.8.4
- @llamaindex/readers@1.0.2
## 0.0.5
### Patch Changes
- Updated dependencies [2ff0a89]
- @llamaindex/node-parser@0.0.2
- llamaindex@0.8.3
## 0.0.4 ## 0.0.4
### Patch Changes ### Patch Changes
+3 -8
View File
@@ -1,4 +1,4 @@
# next # Docs
This is a Next.js application generated with This is a Next.js application generated with
[Create Fumadocs](https://github.com/fuma-nama/fumadocs). [Create Fumadocs](https://github.com/fuma-nama/fumadocs).
@@ -6,15 +6,10 @@ This is a Next.js application generated with
Run development server: Run development server:
```bash ```bash
npm run dev turbo run dev
# or # turbo will build all required packages before running the dev server
pnpm dev
# or
yarn dev
``` ```
Open http://localhost:3000 with your browser to see the result.
## Learn More ## Learn More
To learn more about Next.js and Fumadocs, take a look at the following To learn more about Next.js and Fumadocs, take a look at the following
+17 -2
View File
@@ -1,16 +1,31 @@
import { createMDX } from "fumadocs-mdx/next"; import { createMDX } from "fumadocs-mdx/next";
import MonacoWebpackPlugin from "monaco-editor-webpack-plugin";
const withMDX = createMDX(); const withMDX = createMDX();
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const config = { const config = {
reactStrictMode: true, reactStrictMode: true,
webpack: (config) => { transpilePackages: ["monaco-editor"],
webpack: (config, { isServer }) => {
if (Array.isArray(config.target) && config.target.includes("web")) {
config.target = ["web", "es2020"];
}
config.resolve.alias = { config.resolve.alias = {
...config.resolve.alias, ...config.resolve.alias,
sharp$: false, sharp$: false,
"onnxruntime-node$": false, "onnxruntime-node$": false,
}; };
config.resolve.fallback ??= {};
config.resolve.fallback.fs = false;
if (!isServer) {
config.plugins.push(
new MonacoWebpackPlugin({
languages: ["typescript"],
filename: "static/[name].worker.js",
}),
);
}
return config; return config;
}, },
}; };
+11 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "@llamaindex/doc", "name": "@llamaindex/doc",
"version": "0.0.4", "version": "0.0.14",
"private": true, "private": true,
"scripts": { "scripts": {
"build": "pnpm run build:docs && next build", "build": "pnpm run build:docs && next build",
@@ -12,8 +12,10 @@
}, },
"dependencies": { "dependencies": {
"@icons-pack/react-simple-icons": "^10.1.0", "@icons-pack/react-simple-icons": "^10.1.0",
"@llamaindex/chat-ui": "0.0.5",
"@llamaindex/cloud": "workspace:*", "@llamaindex/cloud": "workspace:*",
"@llamaindex/core": "workspace:*", "@llamaindex/core": "workspace:*",
"@llamaindex/node-parser": "workspace:*",
"@llamaindex/openai": "workspace:*", "@llamaindex/openai": "workspace:*",
"@llamaindex/readers": "workspace:*", "@llamaindex/readers": "workspace:*",
"@llamaindex/workflow": "workspace:*", "@llamaindex/workflow": "workspace:*",
@@ -21,6 +23,8 @@
"@number-flow/react": "^0.3.0", "@number-flow/react": "^0.3.0",
"@radix-ui/react-dialog": "^1.1.2", "@radix-ui/react-dialog": "^1.1.2",
"@radix-ui/react-icons": "^1.3.1", "@radix-ui/react-icons": "^1.3.1",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-slider": "^1.2.1",
"@radix-ui/react-slot": "^1.1.0", "@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.3", "@radix-ui/react-tooltip": "^1.1.3",
"@vercel/functions": "^1.5.0", "@vercel/functions": "^1.5.0",
@@ -44,6 +48,7 @@
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"react-icons": "^5.3.0", "react-icons": "^5.3.0",
"react-monaco-editor": "^0.56.2",
"react-text-transition": "^3.1.0", "react-text-transition": "^3.1.0",
"react-use-measure": "^2.1.1", "react-use-measure": "^2.1.1",
"rehype-katex": "^7.0.1", "rehype-katex": "^7.0.1",
@@ -54,18 +59,22 @@
"swr": "^2.2.5", "swr": "^2.2.5",
"tailwind-merge": "^2.5.2", "tailwind-merge": "^2.5.2",
"tailwindcss-animate": "^1.0.7", "tailwindcss-animate": "^1.0.7",
"tree-sitter": "^0.22.0",
"tree-sitter-typescript": "^0.23.0",
"use-stick-to-bottom": "^1.0.41", "use-stick-to-bottom": "^1.0.41",
"web-tree-sitter": "^0.24.3",
"zod": "^3.23.8" "zod": "^3.23.8"
}, },
"devDependencies": { "devDependencies": {
"@next/env": "^15.0.2", "@next/env": "^15.0.2",
"@types/mdx": "^2.0.13", "@types/mdx": "^2.0.13",
"@types/node": "22.8.6", "@types/node": "22.9.0",
"@types/react": "^18.3.12", "@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1", "@types/react-dom": "^18.3.1",
"autoprefixer": "^10.4.20", "autoprefixer": "^10.4.20",
"fast-glob": "^3.3.2", "fast-glob": "^3.3.2",
"gray-matter": "^4.0.3", "gray-matter": "^4.0.3",
"monaco-editor-webpack-plugin": "^7.1.0",
"postcss": "^8.4.47", "postcss": "^8.4.47",
"remark": "^15.0.1", "remark": "^15.0.1",
"remark-gfm": "^4.0.0", "remark-gfm": "^4.0.0",
Binary file not shown.
BIN
View File
Binary file not shown.
+20 -23
View File
@@ -1,4 +1,4 @@
import { PipelinesService } from "@llamaindex/cloud/api"; import { upsertBatchPipelineDocumentsApiV1PipelinesPipelineIdDocumentsPut } from "@llamaindex/cloud/api";
import fg from "fast-glob"; import fg from "fast-glob";
import { import {
fileGenerator, fileGenerator,
@@ -30,9 +30,8 @@ async function processContent(content: string): Promise<string> {
} }
export async function updateLlamaCloud(): Promise<void> { export async function updateLlamaCloud(): Promise<void> {
// eslint-disable-next-line turbo/no-undeclared-env-vars
const apiKey = process.env.LLAMA_CLOUD_API_KEY; const apiKey = process.env.LLAMA_CLOUD_API_KEY;
// eslint-disable-next-line turbo/no-undeclared-env-vars
const index = process.env.LLAMA_CLOUD_PIPELINE_ID; const index = process.env.LLAMA_CLOUD_PIPELINE_ID;
if (!apiKey || !index) { if (!apiKey || !index) {
@@ -83,28 +82,26 @@ export async function updateLlamaCloud(): Promise<void> {
console.log(`added ${records.length} records`); console.log(`added ${records.length} records`);
await PipelinesService.upsertBatchPipelineDocumentsApiV1PipelinesPipelineIdDocumentsPut( await upsertBatchPipelineDocumentsApiV1PipelinesPipelineIdDocumentsPut({
{ baseUrl: "https://api.cloud.llamaindex.ai/",
baseUrl: "https://api.cloud.llamaindex.ai/", body: records.map((record) => ({
body: records.map((record) => ({ id: record.id,
id: record.id, metadata: {
metadata: { title: record.title,
title: record.title, description: record.description,
description: record.description, documentUrl: record.id,
documentUrl: record.id, category: record.category,
category: record.category,
},
text: record.content,
})),
path: {
pipeline_id: index,
},
throwOnError: true,
headers: {
Authorization: `Bearer ${apiKey}`,
}, },
text: record.content,
})),
path: {
pipeline_id: index,
}, },
); throwOnError: true,
headers: {
Authorization: `Bearer ${apiKey}`,
},
});
console.log("done"); console.log("done");
} }
+18 -17
View File
@@ -11,7 +11,7 @@ import { NpmInstall } from "@/components/npm-install";
import { TextEffect } from "@/components/text-effect"; import { TextEffect } from "@/components/text-effect";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { Skeleton } from "@/components/ui/skeleton"; import { Skeleton } from "@/components/ui/skeleton";
import { DOCUMENT_URL } from "@/lib/const"; import { LEGACY_DOCUMENT_URL } from "@/lib/const";
import { SiStackblitz } from "@icons-pack/react-simple-icons"; import { SiStackblitz } from "@icons-pack/react-simple-icons";
import { import {
CodeBlock as FumaCodeBlock, CodeBlock as FumaCodeBlock,
@@ -25,20 +25,21 @@ export default function HomePage() {
return ( return (
<main className="container mx-auto px-4 py-12"> <main className="container mx-auto px-4 py-12">
<h1 className="text-4xl md:text-6xl font-bold text-center mb-4"> <h1 className="text-4xl md:text-6xl font-bold text-center mb-4">
Build RAG Web App using Build context-augmented web apps using
<br /> <span className="text-blue-500">LlamaIndex.TS</span> <br /> <span className="text-blue-500">LlamaIndex.TS</span>
</h1> </h1>
<p className="text-xl text-center text-fd-muted-foreground mb-12 "> <p className="text-xl text-center text-fd-muted-foreground mb-12 ">
LlamaIndex.TS is the JS/TS library from our popular Python library LlamaIndex.TS is the JS/TS version of{" "}
llama-index for building LLM applications <a href="https://llamaindex.ai">LlamaIndex</a>, the framework for
building agentic generative AI applications connected to your data.
</p> </p>
<div className="text-center text-lg text-fd-muted-foreground mb-12"> <div className="text-center text-lg text-fd-muted-foreground mb-12">
<span>Designed for building web applications under </span> <span>Designed for building web applications in </span>
<TextEffect /> <TextEffect />
</div> </div>
<div className="flex flex-wrap justify-center gap-4"> <div className="flex flex-wrap justify-center gap-4">
<Link href={DOCUMENT_URL}> <Link href={LEGACY_DOCUMENT_URL}>
<Button variant="outline">Get Started</Button> <Button variant="outline">Get Started</Button>
</Link> </Link>
<NpmInstall /> <NpmInstall />
@@ -58,8 +59,8 @@ export default function HomePage() {
<Feature <Feature
icon={Footprints} icon={Footprints}
subheading="Progressive" subheading="Progressive"
heading="Adding AI feature from simple to complex" heading="From the simplest to the most complex"
description="LlamaIndex.TS is designed to be simple to start with and can be extended to build complex AI applications." description="LlamaIndex.TS is designed to be simple to get started, but powerful enough to build complex, agentic AI applications."
> >
<Suspense <Suspense
fallback={ fallback={
@@ -113,9 +114,9 @@ const response = await agent.chat({
</Feature> </Feature>
<Feature <Feature
icon={Bot} icon={Bot}
subheading="Agent" subheading="Agents"
heading="Build agent for RAG" heading="Build agentic RAG applications"
description="Build agents for RAG using LlamaIndex.TS. Agents are the core building blocks of RAG applications." description="Truly powerful retrieval-augmented generation applications use agentic techniques, and LlamaIndex.TS makes it easy to build them."
> >
<CodeBlock <CodeBlock
code={`import { FunctionTool } from "llamaindex"; code={`import { FunctionTool } from "llamaindex";
@@ -137,19 +138,19 @@ await agent.chat('...');`}
<Feature <Feature
icon={Blocks} icon={Blocks}
subheading="Providers" subheading="Providers"
heading="LLM / Data Loader / Vector Store" heading="LLMs, Data Loaders, Vector Stores and more!"
description="LlamaIndex.TS provides various providers to turn your data into valuable insights." description="LlamaIndex.TS has hundreds of integrations to connect to your data, index it, and query it with LLMs."
> >
<div className="mt-8 flex flex-col gap-8"> <div className="mt-8 flex flex-col gap-8">
<div> <div>
<h3 className="text-lg font-semibold text-fd-muted-foreground mb-2"> <h3 className="text-lg font-semibold text-fd-muted-foreground mb-2">
LLM LLMs
</h3> </h3>
<InfiniteLLMProviders /> <InfiniteLLMProviders />
</div> </div>
<div> <div>
<h3 className="text-lg font-semibold text-fd-muted-foreground mb-2"> <h3 className="text-lg font-semibold text-fd-muted-foreground mb-2">
Vector Store Vector Stores
</h3> </h3>
<InfiniteVectorStoreProviders /> <InfiniteVectorStoreProviders />
</div> </div>
@@ -157,8 +158,8 @@ await agent.chat('...');`}
</Feature> </Feature>
<Feature <Feature
icon={Terminal} icon={Terminal}
subheading="Create Llama CLI" subheading="create-llama CLI"
heading="CLI for starting RAG app with one line" heading="Build a RAG app with a single command"
description="A command line tool to generate LlamaIndex apps, the easiest way to get started with LlamaIndex." description="A command line tool to generate LlamaIndex apps, the easiest way to get started with LlamaIndex."
> >
<div className="my-6"> <div className="my-6">
+2 -2
View File
@@ -1,4 +1,4 @@
import { DOCUMENT_URL } from "@/lib/const"; import { LEGACY_DOCUMENT_URL } from "@/lib/const";
import { redirect } from "next/navigation"; import { redirect } from "next/navigation";
export default async function Page(props: { export default async function Page(props: {
@@ -7,5 +7,5 @@ export default async function Page(props: {
}>; }>;
}) { }) {
const path = await props.params.then(({ any }) => any.join("/")); const path = await props.params.then(({ any }) => any.join("/"));
return redirect(new URL(path, DOCUMENT_URL).toString()); return redirect(new URL(path, LEGACY_DOCUMENT_URL).toString());
} }
+30
View File
@@ -0,0 +1,30 @@
import { LlamaIndexAdapter, type Message } from "ai";
import { SimpleChatEngine, type ChatMessage } from "llamaindex";
import { NextResponse, type NextRequest } from "next/server";
export async function POST(request: NextRequest) {
try {
const { messages } = (await request.json()) as { messages: Message[] };
const userMessage = messages[messages.length - 1];
if (!userMessage || userMessage.role !== "user") {
return NextResponse.json(
{ detail: "Last message is not a user message" },
{ status: 400 },
);
}
const chatEngine = new SimpleChatEngine();
return LlamaIndexAdapter.toDataStreamResponse(
await chatEngine.chat({
message: userMessage.content,
chatHistory: messages as ChatMessage[],
stream: true,
}),
{},
);
} catch (error) {
const detail = (error as Error).message;
return NextResponse.json({ detail }, { status: 500 });
}
}
+40 -24
View File
@@ -1,38 +1,54 @@
import { baseOptions } from "@/app/layout.config"; import { baseOptions } from "@/app/layout.config";
import { AITrigger } from "@/components/ai-chat"; import { AITrigger } from "@/components/ai-chat";
import { buttonVariants } from "@/components/ui/button"; import { buttonVariants } from "@/components/ui/button";
import { LEGACY_DOCUMENT_URL } from "@/lib/const";
import { source } from "@/lib/source"; import { source } from "@/lib/source";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import "fumadocs-twoslash/twoslash.css"; import "fumadocs-twoslash/twoslash.css";
import { Banner } from "fumadocs-ui/components/banner";
import { DocsLayout } from "fumadocs-ui/layouts/docs"; import { DocsLayout } from "fumadocs-ui/layouts/docs";
import { MessageCircle } from "lucide-react"; import { MessageCircle } from "lucide-react";
import type { ReactNode } from "react"; import type { ReactNode } from "react";
export default function Layout({ children }: { children: ReactNode }) { export default function Layout({ children }: { children: ReactNode }) {
return ( return (
<DocsLayout <>
tree={source.pageTree} <Banner variant="rainbow" id="welcome">
{...baseOptions} Welcome to the new LlamaIndex.TS documentation! 🎉 If you are looking
nav={{ for the old documentation
...baseOptions.nav, <a
children: ( className="underline text-blue-500 ml-1"
<AITrigger target="_blank"
className={cn( href={LEGACY_DOCUMENT_URL}
buttonVariants({ >
variant: "secondary", check it here
size: "xs", </a>
className: .
"md:flex-1 px-2 ms-2 gap-1.5 text-fd-muted-foreground rounded-full", </Banner>
}), <DocsLayout
)} tree={source.pageTree}
> {...baseOptions}
<MessageCircle className="size-3" /> nav={{
Ask LlamaCloud ...baseOptions.nav,
</AITrigger> children: (
), <AITrigger
}} className={cn(
> buttonVariants({
{children} variant: "secondary",
</DocsLayout> size: "xs",
className:
"md:flex-1 px-2 ms-2 gap-1.5 text-fd-muted-foreground rounded-full",
}),
)}
>
<MessageCircle className="size-3" />
Ask LlamaCloud
</AITrigger>
),
}}
>
{children}
</DocsLayout>
</>
); );
} }
+3 -3
View File
@@ -1,4 +1,4 @@
import { DOCUMENT_URL } from "@/lib/const"; import { LEGACY_DOCUMENT_URL } from "@/lib/const";
import type { BaseLayoutProps } from "fumadocs-ui/layouts/shared"; import type { BaseLayoutProps } from "fumadocs-ui/layouts/shared";
import Image from "next/image"; import Image from "next/image";
@@ -27,8 +27,8 @@ export const baseOptions: BaseLayoutProps = {
githubUrl: "https://github.com/run-llama/LlamaIndexTS", githubUrl: "https://github.com/run-llama/LlamaIndexTS",
links: [ links: [
{ {
text: "Documentation", text: "Docs",
url: DOCUMENT_URL, url: LEGACY_DOCUMENT_URL,
active: "nested-url", active: "nested-url",
}, },
], ],
+1 -9
View File
@@ -1,6 +1,5 @@
import { AIProvider } from "@/actions"; import { AIProvider } from "@/actions";
import { TooltipProvider } from "@/components/ui/tooltip"; import { TooltipProvider } from "@/components/ui/tooltip";
import { Banner } from "fumadocs-ui/components/banner";
import { RootProvider } from "fumadocs-ui/provider"; import { RootProvider } from "fumadocs-ui/provider";
import { Inter } from "next/font/google"; import { Inter } from "next/font/google";
import type { ReactNode } from "react"; import type { ReactNode } from "react";
@@ -36,14 +35,7 @@ export default function Layout({ children }: { children: ReactNode }) {
<body className="flex flex-col min-h-screen"> <body className="flex flex-col min-h-screen">
<TooltipProvider> <TooltipProvider>
<AIProvider> <AIProvider>
<RootProvider> <RootProvider>{children}</RootProvider>
<Banner variant="rainbow" id="experimental">
Welcome to the experimental LlamaIndex.TS documentation site.
Some content are still in progress, you are welcome to help
contribute to the documentation
</Banner>
{children}
</RootProvider>
</AIProvider> </AIProvider>
</TooltipProvider> </TooltipProvider>
</body> </body>
+1 -2
View File
@@ -7,9 +7,8 @@ import { ReactElement } from "react";
export function Contributing(): ReactElement { export function Contributing(): ReactElement {
return ( return (
<div className="flex flex-col items-center border-x border-t px-4 py-16 text-center"> <div className="flex flex-col items-center border-x border-t px-4 py-16 text-center">
<Heart className="mb-4" />
<h2 className="mb-4 text-xl font-semibold sm:text-2xl"> <h2 className="mb-4 text-xl font-semibold sm:text-2xl">
Made Possible by You. Made possible by you <Heart className="inline align-middle" />
</h2> </h2>
<p className="mb-4 text-fd-muted-foreground"> <p className="mb-4 text-fd-muted-foreground">
LlamaIndex.TS is powered by the open source community. LlamaIndex.TS is powered by the open source community.
@@ -53,9 +53,6 @@ export default async function ContributorCounter({
</div> </div>
) : null} ) : null}
</div> </div>
<div className="text-center text-sm text-fd-muted-foreground">
Some of our best contributors.
</div>
</div> </div>
); );
} }
+8
View File
@@ -0,0 +1,8 @@
"use client";
import { ChatSection } from "@llamaindex/chat-ui";
import { useChat } from "ai/react";
export const ChatDemo = () => {
const handler = useChat();
return <ChatSection handler={handler} />;
};
@@ -0,0 +1,182 @@
"use client";
import { createContextState } from "foxact/context-state";
import { useIsClient } from "foxact/use-is-client";
import { useShiki } from "fumadocs-core/utils/use-shiki";
import { CodeBlock, Pre } from "fumadocs-ui/components/codeblock";
import { lazy, Suspense, use, useMemo } from "react";
import { StickToBottom, useStickToBottomContext } from "use-stick-to-bottom";
import Parser from "web-tree-sitter";
import { Label } from "@/components/ui/label";
import { Skeleton } from "@/components/ui/skeleton";
import { Slider } from "@/components/ui/slider";
import { CodeSplitter } from "@llamaindex/node-parser/code";
let promise: Promise<CodeSplitter>;
if (typeof window !== "undefined") {
promise = Parser.init({
locateFile(scriptName: string) {
return "/" + scriptName;
},
}).then(async () => {
const parser = new Parser();
const Lang = await Parser.Language.load("/tree-sitter-typescript.wasm");
parser.setLanguage(Lang);
return new CodeSplitter({
getParser: () => parser,
maxChars: 100,
});
});
}
const [SliderProvider, useSlider, useSetSlider] = createContextState(100);
const [CodeProvider, useCode, useSetCode] =
createContextState(`interface Person {
name: string;
age: number;
}
function greet(person: Person): string {
return \`Hello, \${person.name}! You are \${person.age} years old.\`;
}
const john: Person = {
name: "John Doe",
age: 30
};
console.log(greet(john));`);
const Editor = lazy(() => import("react-monaco-editor"));
export const IDE = () => {
const codeSplitter = use(promise);
const code = useCode();
const setCode = useSetCode();
const maxChars = useSlider();
const useSetMaxChars = useSetSlider();
return (
<div className="flex flex-col p-4 border-r max-h-96 overflow-scroll">
<div>
<Label>Max Chars {maxChars}</Label>
<Slider
className="my-4"
min={10}
max={300}
step={10}
value={[maxChars]}
onValueChange={(value) => {
useSetMaxChars(value[0]);
codeSplitter.maxChars = value[0];
}}
/>
</div>
<Editor
editorWillMount={() => {}}
editorDidMount={() => {
window.MonacoEnvironment!.getWorkerUrl = (
_moduleId: string,
label: string,
) => {
if (label === "json") return "/_next/static/json.worker.js";
if (label === "css") return "/_next/static/css.worker.js";
if (label === "html") return "/_next/static/html.worker.js";
if (label === "typescript" || label === "javascript")
return "/_next/static/ts.worker.js";
return "/_next/static/editor.worker.js";
};
}}
editorWillUnmount={() => {}}
options={{
minimap: {
enabled: false,
},
}}
theme="vs-dark"
height="100%"
width="100%"
language="typescript"
onChange={setCode}
value={code}
/>
</div>
);
};
const Preview = ({ text }: { text: string }) => {
const rendered = useShiki(text, {
lang: "ts",
components: {
pre: (props) => {
return <Pre {...props}>{props.children}</Pre>;
},
},
});
return <CodeBlock className="py-0 m-2">{rendered}</CodeBlock>;
};
function ScrollToBottom() {
const { isAtBottom, scrollToBottom } = useStickToBottomContext();
return (
!isAtBottom && (
<button
className="absolute i-ph-arrow-circle-down-fill text-4xl rounded-lg left-[50%] translate-x-[-50%] bottom-0"
onClick={() => scrollToBottom()}
/>
)
);
}
export const NodePreview = () => {
const parser = use(promise);
const code = useCode();
const maxChars = useSlider();
const textChunks = useMemo(() => parser.splitText(code), [code, maxChars]);
return (
<StickToBottom
className="block relative max-h-96 overflow-scroll"
resize="smooth"
initial="smooth"
>
<StickToBottom.Content>
{textChunks.map((chunk, i) => (
<Preview key={i} text={chunk} />
))}
</StickToBottom.Content>
<ScrollToBottom />
</StickToBottom>
);
};
export const CodeNodeParserDemo = () => {
const isClient = useIsClient();
if (!isClient) {
return (
<div className="my-2 grid grid-cols-1 md:grid-cols-2 gap-2 border rounded-xl w-full max-h-96">
<Skeleton className="h-96" />
<Skeleton className="h-96" />
</div>
);
}
return (
<SliderProvider>
<CodeProvider>
<Suspense
fallback={
<div className="my-2 grid grid-cols-1 md:grid-cols-2 gap-2 border rounded-xl w-full max-h-96">
<Skeleton className="h-96" />
<Skeleton className="h-96" />
</div>
}
>
<div className="my-2 grid grid-cols-1 md:grid-cols-2 gap-2 border rounded-xl w-full max-h-96">
<IDE />
<NodePreview />
</div>
</Suspense>
</CodeProvider>
</SliderProvider>
);
};
@@ -84,7 +84,7 @@ function ScrollToBottom() {
export function WorkflowStreamingDemo() { export function WorkflowStreamingDemo() {
const [ui, setUI] = useState<ReactNode[]>([ const [ui, setUI] = useState<ReactNode[]>([
<div key={0} className="bg-gray-100"> <div key={0} className="bg-gray-100 dark:bg-gray-800">
Waiting for workflow to start Waiting for workflow to start
</div>, </div>,
]); ]);
@@ -110,28 +110,28 @@ export function WorkflowStreamingDemo() {
if (event instanceof ComputeEvent) { if (event instanceof ComputeEvent) {
setUI((ui) => [ setUI((ui) => [
...ui, ...ui,
<div key={i++} className="bg-yellow-100"> <div key={i++} className="bg-yellow-100 dark:bg-yellow-800">
Computing task id: {event.data} Computing task id: {event.data}
</div>, </div>,
]); ]);
} else if (event instanceof ComputeResultEvent) { } else if (event instanceof ComputeResultEvent) {
setUI((ui) => [ setUI((ui) => [
...ui, ...ui,
<div key={i++} className="bg-green-100"> <div key={i++} className="bg-green-100 dark:bg-green-800">
Computed task id: {event.data} Computed task id: {event.data}
</div>, </div>,
]); ]);
} else if (event instanceof StartEvent) { } else if (event instanceof StartEvent) {
setUI((ui) => [ setUI((ui) => [
...ui, ...ui,
<div key={i++} className="bg-blue-100"> <div key={i++} className="bg-blue-100 dark:bg-blue-800">
Started workflow with total {event.data} Started workflow with total {event.data}
</div>, </div>,
]); ]);
} else if (event instanceof StopEvent) { } else if (event instanceof StopEvent) {
setUI((ui) => [ setUI((ui) => [
...ui, ...ui,
<div key={i++} className="bg-red-100"> <div key={i++} className="bg-red-100 dark:bg-red-800">
Workflow stopped Workflow stopped
</div>, </div>,
]); ]);
+36
View File
@@ -0,0 +1,36 @@
import { cva, type VariantProps } from "class-variance-authority";
import * as React from "react";
import { cn } from "@/lib/utils";
const badgeVariants = cva(
"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
{
variants: {
variant: {
default:
"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
secondary:
"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
destructive:
"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
outline: "text-foreground",
},
},
defaultVariants: {
variant: "default",
},
},
);
export interface BadgeProps
extends React.HTMLAttributes<HTMLDivElement>,
VariantProps<typeof badgeVariants> {}
function Badge({ className, variant, ...props }: BadgeProps) {
return (
<div className={cn(badgeVariants({ variant }), className)} {...props} />
);
}
export { Badge, badgeVariants };
+26
View File
@@ -0,0 +1,26 @@
"use client";
import * as LabelPrimitive from "@radix-ui/react-label";
import { cva, type VariantProps } from "class-variance-authority";
import * as React from "react";
import { cn } from "@/lib/utils";
const labelVariants = cva(
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
);
const Label = React.forwardRef<
React.ElementRef<typeof LabelPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
VariantProps<typeof labelVariants>
>(({ className, ...props }, ref) => (
<LabelPrimitive.Root
ref={ref}
className={cn(labelVariants(), className)}
{...props}
/>
));
Label.displayName = LabelPrimitive.Root.displayName;
export { Label };
+28
View File
@@ -0,0 +1,28 @@
"use client";
import * as SliderPrimitive from "@radix-ui/react-slider";
import * as React from "react";
import { cn } from "@/lib/utils";
const Slider = React.forwardRef<
React.ElementRef<typeof SliderPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>
>(({ className, ...props }, ref) => (
<SliderPrimitive.Root
ref={ref}
className={cn(
"relative flex w-full touch-none select-none items-center",
className,
)}
{...props}
>
<SliderPrimitive.Track className="relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20">
<SliderPrimitive.Range className="absolute h-full bg-primary" />
</SliderPrimitive.Track>
<SliderPrimitive.Thumb className="block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" />
</SliderPrimitive.Root>
));
Slider.displayName = SliderPrimitive.Root.displayName;
export { Slider };
@@ -0,0 +1,46 @@
---
title: Chat-UI
description: Use chat-ui to add a chat interface to your LlamaIndexTS application.
---
import { ChatDemo } from '../../../../components/demo/chat';
import "@llamaindex/chat-ui/styles/code.css";
import "@llamaindex/chat-ui/styles/katex.css";
Using [chat-ui](https://github.com/run-llama/chat-ui), it's easy to add a chat interface to your LlamaIndexTS application.
You just need to create an API route that provides an `api/chat` endpoint and a chat component to consume the API.
## API route
As an example, this is an API route for the Next.js App Router. Copy the following code into your `app/api/chat/route.ts` file to get started:
```json doc-gen:file
{
"file": "./src/app/api/chat/route.ts",
"codeblock": true
}
```
## Chat UI
This is the simplest way to add a chat interface to your application. Copy the following code into your application to consume the API:
```json doc-gen:file
{
"file": "./src/components/demo/chat.tsx",
"codeblock": true
}
```
## Try it out ⬇️
Combining both, you're getting a fully functional chat interface:
<ChatDemo />
## Next Steps
The steps above are the bare minimum to get a chat interface working. From here, you can go two ways:
1. Use [create-llama](https://github.com/run-llama/create-llama) to scaffold a new LlamaIndexTS project including complex API routes and chat interfaces or
2. Learn more about [chat-ui](https://github.com/run-llama/chat-ui) and [LlamaIndexTS](https://github.com/run-llama/llamaindex-ts) to customize the chat interface and API routes to your needs.
@@ -1,5 +1,5 @@
{ {
"title": "Guide", "title": "Guide",
"description": "See our guide", "description": "See our guide",
"pages": ["workflow"] "pages": ["workflow", "chat"]
} }
@@ -22,20 +22,10 @@ import { Tab, Tabs } from "fumadocs-ui/components/tabs";
## What's next? ## What's next?
<Cards> <Cards>
<Card
title="I'm new to RAG"
description="Learn more about RAG (Retrieval-augmented generation) using LlamaIndex.TS."
href="/docs/llamaindex/setup/what-is-rag"
/>
<Card <Card
title="I want to try LlamaIndex.TS" title="I want to try LlamaIndex.TS"
description="Learn how to use LlamaIndex.TS with different JS runtime and frameworks." description="Learn how to use LlamaIndex.TS with different JS runtime and frameworks."
href="/docs/llamaindex/setup" href="/docs/llamaindex/setup/getting-started"
/>
<Card
title="I want to improve performance when using LlamaIndex.TS"
description="Learn how to improve performance, reduce bundle size, improve accuracy."
href="/docs/llamaindex/performance"
/> />
<Card <Card
title="Show me code examples" title="Show me code examples"
@@ -2,6 +2,7 @@
title: Node Parsers / Text Splitters title: Node Parsers / Text Splitters
description: Learn how to use Node Parsers and Text Splitters to extract data from documents. description: Learn how to use Node Parsers and Text Splitters to extract data from documents.
--- ---
import { CodeNodeParserDemo } from '../../../../components/demo/code-node-parser';
import { Tab, Tabs } from "fumadocs-ui/components/tabs"; import { Tab, Tabs } from "fumadocs-ui/components/tabs";
Node parsers are a simple abstraction that take a list of documents, and chunk them into `Node` objects, such that each node is a specific chunk of the parent document. When a document is broken into nodes, all of it's attributes are inherited to the children nodes (i.e. `metadata`, text and metadata templates, etc.). You can read more about `Node` and `Document` properties [here](./). Node parsers are a simple abstraction that take a list of documents, and chunk them into `Node` objects, such that each node is a specific chunk of the parent document. When a document is broken into nodes, all of it's attributes are inherited to the children nodes (i.e. `metadata`, text and metadata templates, etc.). You can read more about `Node` and `Document` properties [here](./).
@@ -10,30 +11,17 @@ Node parsers are a simple abstraction that take a list of documents, and chunk t
The `NodeParser` in LlamaIndex is responsible for splitting `Document` objects into more manageable `Node` objects. The `NodeParser` in LlamaIndex is responsible for splitting `Document` objects into more manageable `Node` objects.
<Tabs items={["with reader", "with node:fs"]}> By default, we will use `Settings.nodeParser` to split the document into nodes. You can also assign a custom `NodeParser` to the `Settings` object.
```ts twoslash tab="with reader"
import { TextFileReader } from '@llamaindex/readers/text'
import {SentenceSplitter} from '@llamaindex/core/node-parser';
const nodeParser = new SentenceSplitter(); ```ts twoslash
const reader = new TextFileReader(); import { TextFileReader } from '@llamaindex/readers/text'
const documents = await reader.loadData('path/to/file.txt'); import { SentenceSplitter } from '@llamaindex/core/node-parser';
import { Settings } from 'llamaindex';
const parsedDocuments = nodeParser(documents); const nodeParser = new SentenceSplitter();
// ^? Settings.nodeParser = nodeParser;
// ^?
``` ```
```ts twoslash tab="with node:fs"
import fs from 'node:fs/promises';
import { SentenceSplitter } from '@llamaindex/core/node-parser';
const nodeParser = new SentenceSplitter();
const texts = nodeParser.splitText(await fs.readFile('path/to/file.txt', 'utf-8'));
// ^?
```
</Tabs>
## TextSplitter ## TextSplitter
@@ -79,4 +67,92 @@ The `MarkdownNodeParser` is a more advanced `NodeParser` that can handle markdow
// ^? // ^?
``` ```
</Tabs> </Tabs>
## CodeSplitter
The `CodeSplitter` is a more advanced `NodeParser` that can handle code documents.
It will split the code by AST nodes and then parse the nodes into a `Document` object.
<Tabs items={["with reader", "with node:fs"]}>
```ts twoslash tab="with reader"
import { TextFileReader } from '@llamaindex/readers/text'
import { CodeSplitter } from '@llamaindex/node-parser/code'
import Parser from "tree-sitter";
import TS from "tree-sitter-typescript";
const parser = new Parser();
parser.setLanguage(TS.typescript);
const codeSplitter = new CodeSplitter({
getParser: () => parser,
});
const reader = new TextFileReader();
const documents = await reader.loadData('path/to/file.ts');
const parsedDocuments = codeSplitter(documents);
// ^?
```
```ts twoslash tab="with node:fs"
import fs from 'node:fs/promises';
import { CodeSplitter } from '@llamaindex/node-parser/code'
import Parser from "tree-sitter";
import TS from "tree-sitter-typescript";
const parser = new Parser();
parser.setLanguage(TS.typescript);
const codeSplitter = new CodeSplitter({
getParser: () => parser,
});
const parsedDocuments = codeSplitter.splitText(await fs.readFile('path/to/file.ts', 'utf-8'));
// ^?
```
</Tabs>
Try it out ⬇️
<CodeNodeParserDemo/>
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
<Accordions>
<Accordion title="Use it in browser">
You might setup WASM files for `web-tree-sitter` and use it in the browser.
```ts
import Parser from 'web-tree-sitter';
Parser.init({
locateFile(scriptName: string) {
return '/' + scriptName
},
}).then(async () => {
const parser = new Parser();
const Lang = await Parser.Language.load('/tree-sitter-typescript.wasm');
parser.setLanguage(Lang);
return new CodeSplitter({
getParser: () => parser,
maxChars: 100
});
});
```
In this example, you should put `tree-sitter-typescript.wasm` to the `public` folder for Next.js.
And also update the `next.config.js` to make `@llamaindex/env` work properly.
```js
const config = {
webpack: (config) => {
if (Array.isArray(config.target) && config.target.includes('web')) {
config.target = ["web", "es2020"];
}
return config;
}
}
export default config;
```
</Accordion>
</Accordions>
@@ -93,6 +93,35 @@ See more about [moduleResolution](https://www.typescriptlang.org/docs/handbook/m
</Accordion> </Accordion>
</Accordions> </Accordions>
## Enable AsyncIterable for `Web Stream` API
Some modules uses `Web Stream` API like `ReadableStream` and `WritableStream`, you need to enable `DOM.AsyncIterable` in your `tsconfig.json`.
```json5
{
compilerOptions: {
// ⬇️ add this lib to your tsconfig.json
lib: ["DOM.AsyncIterable"],
},
}
```
```ts twoslash
import { OpenAIAgent } from '@llamaindex/openai'
const agent = new OpenAIAgent({
tools: []
})
const response = await agent.chat({
message: 'Hello, how are you?',
stream: true
})
for await (const _ of response) {
//^?
// ...
}
```
## Run TypeScript Script in Node.js ## Run TypeScript Script in Node.js
+2 -2
View File
@@ -1,8 +1,8 @@
import { import {
type MetadataFilter, type MetadataFilter,
type MetadataFilters, type MetadataFilters,
PipelinesService,
type RetrievalParams, type RetrievalParams,
runSearchApiV1PipelinesPipelineIdRetrievePost,
type TextNodeWithScore, type TextNodeWithScore,
} from "@llamaindex/cloud/api"; } from "@llamaindex/cloud/api";
import { QueryBundle } from "@llamaindex/core/query-engine"; import { QueryBundle } from "@llamaindex/core/query-engine";
@@ -74,7 +74,7 @@ export class LlamaCloudRetriever extends BaseRetriever {
const pipelineId = this.pipelineId; const pipelineId = this.pipelineId;
const { data: results } = const { data: results } =
await PipelinesService.runSearchApiV1PipelinesPipelineIdRetrievePost({ await runSearchApiV1PipelinesPipelineIdRetrievePost({
throwOnError: true, throwOnError: true,
path: { path: {
pipeline_id: pipelineId, pipeline_id: pipelineId,
+1 -1
View File
@@ -1,2 +1,2 @@
// when we are ready, change to /docs/llamaindex // when we are ready, change to /docs/llamaindex
export const DOCUMENT_URL = 'https://legacy.ts.llamaindex.ai/' export const LEGACY_DOCUMENT_URL = 'https://legacy.ts.llamaindex.ai/'
+1
View File
@@ -10,6 +10,7 @@ export default {
"./src/mdx-components.{ts,tsx}", "./src/mdx-components.{ts,tsx}",
"./node_modules/fumadocs-ui/dist/**/*.js", "./node_modules/fumadocs-ui/dist/**/*.js",
"./node_modules/fumadocs-openapi/dist/**/*.js", "./node_modules/fumadocs-openapi/dist/**/*.js",
"./node_modules/@llamaindex/chat-ui/**/*.{ts,tsx}",
], ],
presets: [createPreset()], presets: [createPreset()],
// eslint-disable-next-line @typescript-eslint/no-require-imports // eslint-disable-next-line @typescript-eslint/no-require-imports
+16
View File
@@ -0,0 +1,16 @@
{
"extends": ["//"],
"tasks": {
"build": {
"outputs": [
".next",
".source",
"next-env.d.ts",
"src/content/docs/cloud/api/**"
]
},
"dev": {
"dependsOn": ["^build"]
}
}
}
@@ -1,5 +1,74 @@
# @llamaindex/cloudflare-worker-agent-test # @llamaindex/cloudflare-worker-agent-test
## 0.0.108
### Patch Changes
- llamaindex@0.8.12
## 0.0.107
### Patch Changes
- llamaindex@0.8.11
## 0.0.106
### Patch Changes
- Updated dependencies [f066e50]
- llamaindex@0.8.10
## 0.0.105
### Patch Changes
- Updated dependencies [4fc001c]
- Updated dependencies [4d4cd8a]
- llamaindex@0.8.9
## 0.0.104
### Patch Changes
- Updated dependencies [ad85bd0]
- llamaindex@0.8.8
## 0.0.103
### Patch Changes
- llamaindex@0.8.7
## 0.0.102
### Patch Changes
- Updated dependencies [95a5cc6]
- llamaindex@0.8.6
## 0.0.101
### Patch Changes
- Updated dependencies [14cc9eb]
- Updated dependencies [a6db5dd]
- Updated dependencies [396b1e1]
- llamaindex@0.8.5
## 0.0.100
### Patch Changes
- Updated dependencies [35430d3]
- llamaindex@0.8.4
## 0.0.99
### Patch Changes
- llamaindex@0.8.3
## 0.0.98 ## 0.0.98
### Patch Changes ### Patch Changes
@@ -1,6 +1,6 @@
{ {
"name": "@llamaindex/cloudflare-worker-agent-test", "name": "@llamaindex/cloudflare-worker-agent-test",
"version": "0.0.98", "version": "0.0.108",
"type": "module", "type": "module",
"private": true, "private": true,
"scripts": { "scripts": {
@@ -14,10 +14,10 @@
"devDependencies": { "devDependencies": {
"@cloudflare/vitest-pool-workers": "^0.5.8", "@cloudflare/vitest-pool-workers": "^0.5.8",
"@cloudflare/workers-types": "^4.20240924.0", "@cloudflare/workers-types": "^4.20240924.0",
"@vitest/runner": "2.1.1", "@vitest/runner": "2.1.4",
"@vitest/snapshot": "2.1.1", "@vitest/snapshot": "2.1.4",
"typescript": "^5.6.2", "typescript": "^5.6.3",
"vitest": "2.1.1", "vitest": "2.1.4",
"wrangler": "^3.78.8" "wrangler": "^3.78.8"
}, },
"dependencies": { "dependencies": {
@@ -1,5 +1,53 @@
# @llamaindex/llama-parse-browser-test # @llamaindex/llama-parse-browser-test
## 0.0.29
### Patch Changes
- @llamaindex/cloud@2.0.9
## 0.0.28
### Patch Changes
- @llamaindex/cloud@2.0.8
## 0.0.27
### Patch Changes
- @llamaindex/cloud@2.0.7
## 0.0.26
### Patch Changes
- @llamaindex/cloud@2.0.6
## 0.0.25
### Patch Changes
- @llamaindex/cloud@2.0.5
## 0.0.24
### Patch Changes
- @llamaindex/cloud@2.0.4
## 0.0.23
### Patch Changes
- @llamaindex/cloud@2.0.3
## 0.0.22
### Patch Changes
- @llamaindex/cloud@2.0.2
## 0.0.21 ## 0.0.21
### Patch Changes ### Patch Changes
@@ -1,7 +1,7 @@
{ {
"name": "@llamaindex/llama-parse-browser-test", "name": "@llamaindex/llama-parse-browser-test",
"private": true, "private": true,
"version": "0.0.21", "version": "0.0.29",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
@@ -9,7 +9,7 @@
"preview": "vite preview" "preview": "vite preview"
}, },
"devDependencies": { "devDependencies": {
"typescript": "^5.5.3", "typescript": "^5.6.3",
"vite": "^5.4.1", "vite": "^5.4.1",
"vite-plugin-wasm": "^3.3.0" "vite-plugin-wasm": "^3.3.0"
}, },
@@ -1,5 +1,5 @@
{ {
"extends": "../../../../../tsconfig.json", "extends": "../../../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"target": "ES2020", "target": "ES2020",
"useDefineForClassFields": true, "useDefineForClassFields": true,
@@ -20,7 +20,7 @@
}, },
"references": [ "references": [
{ {
"path": "../../../../cloud/tsconfig.json" "path": "../../../packages/cloud/tsconfig.json"
} }
] ]
} }
@@ -1,5 +1,74 @@
# @llamaindex/next-agent-test # @llamaindex/next-agent-test
## 0.1.108
### Patch Changes
- llamaindex@0.8.12
## 0.1.107
### Patch Changes
- llamaindex@0.8.11
## 0.1.106
### Patch Changes
- Updated dependencies [f066e50]
- llamaindex@0.8.10
## 0.1.105
### Patch Changes
- Updated dependencies [4fc001c]
- Updated dependencies [4d4cd8a]
- llamaindex@0.8.9
## 0.1.104
### Patch Changes
- Updated dependencies [ad85bd0]
- llamaindex@0.8.8
## 0.1.103
### Patch Changes
- llamaindex@0.8.7
## 0.1.102
### Patch Changes
- Updated dependencies [95a5cc6]
- llamaindex@0.8.6
## 0.1.101
### Patch Changes
- Updated dependencies [14cc9eb]
- Updated dependencies [a6db5dd]
- Updated dependencies [396b1e1]
- llamaindex@0.8.5
## 0.1.100
### Patch Changes
- Updated dependencies [35430d3]
- llamaindex@0.8.4
## 0.1.99
### Patch Changes
- llamaindex@0.8.3
## 0.1.98 ## 0.1.98
### Patch Changes ### Patch Changes
@@ -1,6 +1,6 @@
{ {
"name": "@llamaindex/next-agent-test", "name": "@llamaindex/next-agent-test",
"version": "0.1.98", "version": "0.1.108",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",
@@ -10,18 +10,18 @@
"dependencies": { "dependencies": {
"ai": "^3.3.21", "ai": "^3.3.21",
"llamaindex": "workspace:*", "llamaindex": "workspace:*",
"next": "14.2.11", "next": "15.0.2",
"react": "18.3.1", "react": "18.3.1",
"react-dom": "18.3.1" "react-dom": "18.3.1"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.8.4", "@types/node": "^22.9.0",
"@types/react": "^18.3.12", "@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1", "@types/react-dom": "^18.3.1",
"eslint": "9.13.0", "eslint": "9.14.0",
"eslint-config-next": "15.0.2", "eslint-config-next": "15.0.2",
"postcss": "^8.4.41", "postcss": "^8.4.41",
"tailwindcss": "^3.4.10", "tailwindcss": "^3.4.10",
"typescript": "^5.6.2" "typescript": "^5.6.3"
} }
} }

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before

Width:  |  Height:  |  Size: 629 B

After

Width:  |  Height:  |  Size: 629 B

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

@@ -1,5 +1,5 @@
{ {
"extends": "../../../../../tsconfig.json", "extends": "../../../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"], "lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true, "allowJs": true,
@@ -1,5 +1,74 @@
# test-edge-runtime # test-edge-runtime
## 0.1.107
### Patch Changes
- llamaindex@0.8.12
## 0.1.106
### Patch Changes
- llamaindex@0.8.11
## 0.1.105
### Patch Changes
- Updated dependencies [f066e50]
- llamaindex@0.8.10
## 0.1.104
### Patch Changes
- Updated dependencies [4fc001c]
- Updated dependencies [4d4cd8a]
- llamaindex@0.8.9
## 0.1.103
### Patch Changes
- Updated dependencies [ad85bd0]
- llamaindex@0.8.8
## 0.1.102
### Patch Changes
- llamaindex@0.8.7
## 0.1.101
### Patch Changes
- Updated dependencies [95a5cc6]
- llamaindex@0.8.6
## 0.1.100
### Patch Changes
- Updated dependencies [14cc9eb]
- Updated dependencies [a6db5dd]
- Updated dependencies [396b1e1]
- llamaindex@0.8.5
## 0.1.99
### Patch Changes
- Updated dependencies [35430d3]
- llamaindex@0.8.4
## 0.1.98
### Patch Changes
- llamaindex@0.8.3
## 0.1.97 ## 0.1.97
### Patch Changes ### Patch Changes
@@ -1,6 +1,6 @@
{ {
"name": "@llamaindex/nextjs-edge-runtime-test", "name": "@llamaindex/nextjs-edge-runtime-test",
"version": "0.1.97", "version": "0.1.107",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",
@@ -9,14 +9,14 @@
}, },
"dependencies": { "dependencies": {
"llamaindex": "workspace:*", "llamaindex": "workspace:*",
"next": "14.2.11", "next": "15.0.2",
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1" "react-dom": "^18.3.1"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.8.4", "@types/node": "^22.9.0",
"@types/react": "^18.3.12", "@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1", "@types/react-dom": "^18.3.1",
"typescript": "^5.6.2" "typescript": "^5.6.3"
} }
} }

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before

Width:  |  Height:  |  Size: 629 B

After

Width:  |  Height:  |  Size: 629 B

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

@@ -1,5 +1,74 @@
# @llamaindex/next-node-runtime # @llamaindex/next-node-runtime
## 0.0.89
### Patch Changes
- llamaindex@0.8.12
## 0.0.88
### Patch Changes
- llamaindex@0.8.11
## 0.0.87
### Patch Changes
- Updated dependencies [f066e50]
- llamaindex@0.8.10
## 0.0.86
### Patch Changes
- Updated dependencies [4fc001c]
- Updated dependencies [4d4cd8a]
- llamaindex@0.8.9
## 0.0.85
### Patch Changes
- Updated dependencies [ad85bd0]
- llamaindex@0.8.8
## 0.0.84
### Patch Changes
- llamaindex@0.8.7
## 0.0.83
### Patch Changes
- Updated dependencies [95a5cc6]
- llamaindex@0.8.6
## 0.0.82
### Patch Changes
- Updated dependencies [14cc9eb]
- Updated dependencies [a6db5dd]
- Updated dependencies [396b1e1]
- llamaindex@0.8.5
## 0.0.81
### Patch Changes
- Updated dependencies [35430d3]
- llamaindex@0.8.4
## 0.0.80
### Patch Changes
- llamaindex@0.8.3
## 0.0.79 ## 0.0.79
### Patch Changes ### Patch Changes
@@ -1,6 +1,6 @@
{ {
"name": "@llamaindex/next-node-runtime-test", "name": "@llamaindex/next-node-runtime-test",
"version": "0.0.79", "version": "0.0.89",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",
@@ -9,18 +9,18 @@
}, },
"dependencies": { "dependencies": {
"llamaindex": "workspace:*", "llamaindex": "workspace:*",
"next": "14.2.11", "next": "15.0.2",
"react": "18.3.1", "react": "18.3.1",
"react-dom": "18.3.1" "react-dom": "18.3.1"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.8.4", "@types/node": "^22.9.0",
"@types/react": "^18.3.12", "@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1", "@types/react-dom": "^18.3.1",
"eslint": "9.13.0", "eslint": "9.14.0",
"eslint-config-next": "15.0.2", "eslint-config-next": "15.0.2",
"postcss": "^8.4.41", "postcss": "^8.4.41",
"tailwindcss": "^3.4.10", "tailwindcss": "^3.4.10",
"typescript": "^5.6.2" "typescript": "^5.6.3"
} }
} }

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before

Width:  |  Height:  |  Size: 629 B

After

Width:  |  Height:  |  Size: 629 B

@@ -15,7 +15,6 @@ Settings.llm = new OpenAI({
}); });
Settings.embedModel = new HuggingFaceEmbedding({ Settings.embedModel = new HuggingFaceEmbedding({
modelType: "BAAI/bge-small-en-v1.5", modelType: "BAAI/bge-small-en-v1.5",
quantized: false,
}); });
Settings.callbackManager.on("llm-tool-call", (event) => { Settings.callbackManager.on("llm-tool-call", (event) => {
console.log(event.detail); console.log(event.detail);

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Some files were not shown because too many files have changed in this diff Show More