Compare commits

...

139 Commits

Author SHA1 Message Date
Alex Yang dcce45d524 fix: commit 2024-01-18 10:27:52 -06:00
Alex Yang 9b1e6c861f feat: next.js stuff 2024-01-17 23:48:10 -06:00
Alex Yang bbc5d17421 feat: edge runtime 2024-01-17 23:44:20 -06:00
Alex Yang ef4f235fc2 fix: bundle 2024-01-17 17:12:47 -06:00
Alex Yang f6b6a3d83e fix: environment 2024-01-16 21:00:21 -06:00
Alex Yang b86213d8dd fix: crypto.randomUUID 2024-01-16 20:53:05 -06:00
Alex Yang 1f8e78531c fix: test 2024-01-16 20:48:42 -06:00
Alex Yang 17249a30ef fix: remove unused 2024-01-16 20:46:44 -06:00
Alex Yang 9bc2de491e fix: import 2024-01-16 20:33:50 -06:00
Alex Yang 8077ad47de fix: test 2024-01-16 20:31:45 -06:00
Alex Yang 33fb5b4495 fix: import 2024-01-16 20:30:27 -06:00
Alex Yang c221764198 fix: import 2024-01-16 20:29:48 -06:00
Alex Yang e1ca0ad2fd fix: file system 2024-01-16 20:28:06 -06:00
Alex Yang f7ac1913b9 feat: move node related code into environments.ts 2024-01-16 19:22:20 -06:00
Alex Yang 03efd103cc fix: turbo.json 2024-01-16 18:33:57 -06:00
Alex Yang 31f6219f96 feat: clean edge runtime 2024-01-16 18:29:37 -06:00
Alex Yang 3c7c25d2f2 Merge branch 'main' into himself65/edge-runtime 2024-01-16 18:26:35 -06:00
Huu Le (Lee) 9492cc64b5 Added option to automatically install dependencies (for Python and TS) (#381) 2024-01-16 16:12:37 +07:00
Alex Yang 5773f97e88 feat: add together AI vector index example (#390) 2024-01-15 21:52:15 -06:00
Marcus Schiesser 0784dc3a0a fix: replace missing import * as (#392) 2024-01-15 21:37:01 -06:00
Alex Yang 645a64b3bb feat(core): support edge runtime 2024-01-15 18:43:10 -06:00
Alex Yang 7993be7d0d RELEASING: Releasing 2 package(s)
Releases:
  llamaindex@0.0.46
  create-llama@0.0.15

[skip ci]
2024-01-15 14:21:18 -06:00
Alex Yang f22ce6e757 Revert "RELEASING: Releasing 2 package(s)"
This reverts commit 3c4347b247.
2024-01-15 14:21:18 -06:00
Alex Yang 3c4347b247 RELEASING: Releasing 2 package(s)
Releases:
  llamaindex@0.1.0
  create-llama@0.0.15

[skip ci]
2024-01-15 14:08:59 -06:00
Aziz Khoury 977f2840b9 fix: wrong import for path in SimpleKVStore.ts (#383)
Co-authored-by: Alex Yang <himself65@outlook.com>
2024-01-15 14:03:30 -06:00
Alex Yang 5d3bb6642e fix: default import (#386) 2024-01-15 13:59:31 -06:00
Marcus Schiesser 2001eb7ffb fix: format 2024-01-15 18:15:44 +07:00
Marcus Schiesser f18c9f69d4 refactor: update low-level streaming interface (#325) 2024-01-15 18:06:53 +07:00
Thuc Pham 8e124e5b63 feat: support showing image for chat message in NextJS (#368) 2024-01-15 17:57:20 +07:00
Nir Gazit 4ed5e544b0 docs: added openllmetry observability (#369) 2024-01-15 10:15:02 +07:00
Alex Yang b185bda5b1 RELEASING: Releasing 2 package(s)
Releases:
  create-llama@0.0.14
  llamaindex@0.0.45

[skip ci]
2024-01-14 18:14:55 -06:00
Alex Yang d79804e271 docs: update README.md (#376) 2024-01-14 18:10:55 -06:00
Alex Yang 2b356c8613 fix(create-llama): component choice (#377) 2024-01-14 18:10:33 -06:00
Alex Yang 2e6b36ef4b docs: update changelog (#374) 2024-01-12 18:49:53 -06:00
Alex Yang edd0f66234 feat: support Together AI (#373) 2024-01-12 18:41:48 -06:00
Alex Yang 2da407d66c fix: cover type check on all ts files (#372) 2024-01-12 15:36:04 -06:00
Alex Yang fa574f709e chore(core): use bunchee to bundle (#370) 2024-01-12 12:50:33 -06:00
Alex Yang 1e6171521b refactor: use crypto.randomUUID (#371)
Ref: https://nodejs.org/docs/latest/api/crypto.html#cryptorandomuuidoptions
2024-01-12 12:30:17 -06:00
Marcus Schiesser 3f3e4eca66 RELEASING: Releasing 1 package(s)
Releases:
  llamaindex@0.0.44

[skip ci]
2024-01-12 14:21:11 +07:00
Thuc Pham 648482b0f1 Feat: Add support for ChromaDB (#310)
Co-authored-by: Aarav Navani <38411399+oofmeister27@users.noreply.github.com>
2024-01-12 13:35:00 +07:00
Marcus Schiesser bb46afe33d RELEASING: Releasing 1 package(s)
Releases:
  create-llama@0.0.13

[skip ci]
2024-01-11 14:30:38 +07:00
Marcus Schiesser 80f5914abf fix: raise exception if PG_CONNECTION_STRING is empty (generated value) 2024-01-11 14:25:00 +07:00
Marcus Schiesser 1c4e7f9c3e chore: change release process 2024-01-11 13:22:54 +07:00
Marcus Schiesser e4ae6e9076 RELEASING: Releasing 1 package(s)
Releases:
  llamaindex@0.0.43

[skip ci]
2024-01-11 13:19:23 +07:00
Marcus Schiesser f93efa2ea1 fix: disabled sweep (was trying to work on a draft PR) 2024-01-11 11:02:24 +07:00
Thuc Pham 7d79365262 feat: add examples and docs for readers (#323) 2024-01-11 11:42:13 +08:00
Huu Le (Lee) 555692207e Feat[cl]: Add postgresql vector store for fastapi (#318) 2024-01-11 11:03:12 +08:00
Alex Yang fcc06b227a fix(perf): use regex to spilt texts (#364) 2024-01-10 17:27:50 -06:00
Thuc Pham 08a39790e4 fix: default separator not work for window os (#324) 2024-01-10 17:07:08 +08:00
Marcus Schiesser a8270082a0 fix: improve async handling in fastapi (#322) 2024-01-10 11:55:13 +08:00
Marcus Schiesser 85da798538 llamaindex@0.0.42 2024-01-08 17:06:22 +07:00
Marcus Schiesser b68d8697df fix: add missing metadata after node parsing (#317) 2024-01-08 17:48:44 +08:00
fatdoge 7704df5042 Update starter.md (#316)
Markdown link render error fix.
2024-01-08 17:03:46 +08:00
Marcus Schiesser 16f04c7e7e docs: add changeset 2024-01-08 15:58:58 +07:00
Marcus Schiesser 7c6b3117bf feat: use local embedding for sentence window example and log progress 2024-01-08 15:58:58 +07:00
Marcus Schiesser 7def68fb37 feat: added local embedding 2024-01-08 15:58:58 +07:00
Marcus Schiesser 03ed2b4129 feat: add sentenceWindow.ts example 2024-01-08 15:58:58 +07:00
Marcus Schiesser 733d62a699 feat: add MetadataReplacementPostProcessor 2024-01-08 15:58:58 +07:00
Marcus Schiesser f76e1d0796 feat: add sentence window node parser 2024-01-08 15:58:58 +07:00
Marcus Schiesser 88d42ccd8d refactor: move node parsers to own package 2024-01-08 15:58:58 +07:00
Thuc Pham a0686fb1f2 docs: remove serverComponentsExternalPackages config (#314) 2024-01-08 16:35:06 +08:00
Marcus Schiesser 3d198d94a6 llamaindex@0.0.41 2024-01-08 15:18:24 +07:00
Thuc Pham 036c00db73 Feat: add postgres vectordb (#308)
* feat: integrate create-llama with postgresql 
* fix: get data for verification before inserting
* feat: show available vector DBs based on framework
2024-01-05 14:13:52 +08:00
Alex Yang 548f0687f1 feat(core): init support for Ollama (#305) 2024-01-04 18:03:00 -06:00
Marcus Schiesser f85c042a94 refactor: encapsulate node serialization 2024-01-04 10:19:18 +07:00
yisding 40e892f813 Oops adding back Alex's crypto changes 2024-01-04 10:19:18 +07:00
yisding 2381025306 move clone outside of toJSON
I like structuredClone although we have an issue with AWS only
supporting Node 16
2024-01-04 10:19:18 +07:00
Marcus Schiesser a0909dc053 docs: updated how to create a mongodb vector index 2024-01-04 10:19:18 +07:00
Marcus Schiesser 853a14b7c7 fix: add test cases, ensure that a node's metadata is not modified and remove text if requested 2024-01-04 10:19:18 +07:00
yisding b31e2d42eb fixed recursive issue in metadataDictToNode 2024-01-04 10:19:18 +07:00
yisding 5b6ad9419f fix mongo example 2024-01-04 10:19:18 +07:00
Marcus Schiesser a60948a87e fix: add format check to pre-commit 2024-01-03 10:39:54 +07:00
Alex Yang 8b420da753 style: prettier format (#304) 2024-01-02 17:12:06 -06:00
Alex Yang 12c079b74a refactor: remove unused deps (#303) 2024-01-02 16:40:24 -06:00
Marcus Schiesser c835f78dd0 docs: added changesets for core 2024-01-02 16:07:12 +07:00
Marcus Schiesser d52eb9d4ee fix[docs]: installation link (#302) 2024-01-02 12:25:56 +08:00
Marcus Schiesser 0cfd9f60b5 create-llama@0.0.12 2024-01-02 11:02:34 +07:00
Marcus Schiesser 5ab65eb95a fix[cl]: naming bug and added release changeset 2023-12-29 17:58:43 +07:00
Marcus Schiesser b13fb36de0 Merge pull request #295 from run-llama/ms/cl-python-add-mongodb
Feat: Add MongoDB Vector DB support for Python projects in create-llama
2023-12-29 15:01:06 +07:00
Marcus Schiesser d8fe65a273 refactor: improved var naming 2023-12-29 14:26:29 +07:00
Marcus Schiesser ba1cb996cf refactor: separate python and typescript generators 2023-12-29 14:10:01 +07:00
thucpn 41f41d6543 feat: prepare python dependencies 2023-12-29 13:47:41 +07:00
thucpn e25fc44db9 Merge branch 'ms/cl-python-add-mongodb' of github.com:run-llama/LlamaIndexTS into ms/cl-python-add-mongodb 2023-12-28 14:53:22 +07:00
thucpn 2ea91dc94b docs: update packages 2023-12-28 14:52:12 +07:00
Marcus Schiesser b16419ad3e Update packages/create-llama/templates/index.ts 2023-12-28 15:12:03 +08:00
thucpn 1e3c05c408 feat: question to select vectordb for python template 2023-12-28 14:03:35 +07:00
Marcus Schiesser a7eb59f472 fix: update pnpm-lock.yaml 2023-12-28 13:58:11 +07:00
Marcus Schiesser e99448481c Merge pull request #296 from run-llama/add-pinecone-vector-store
Add pinecone vector store
2023-12-28 13:49:40 +07:00
Michael Tutty 83ab7622d9 Fix reference in examples/pinecone-vector-store 2023-12-28 13:44:35 +07:00
Michael Tutty d4312d504b Resolve PR issues for pinecone-vector-store 2023-12-28 13:44:35 +07:00
Michael Tutty 95742e7704 AddPineconeVectorStore to storage/index.ts 2023-12-28 13:44:35 +07:00
Michael Tutty a8845a33df Add apps/simple/pinecone-vector-store 2023-12-28 13:44:35 +07:00
Michael Tutty b3fd87f302 Add PineconeVectorStore 2023-12-28 13:44:34 +07:00
Marcus Schiesser 25ba970e09 feat: added python code for mongodb 2023-12-28 11:47:41 +07:00
Marcus Schiesser a67f9aaad7 Merge pull request #292 from run-llama/ms/cl-python-features
Feat: Bring Python templates with TS templates to feature parity
2023-12-28 11:31:11 +07:00
Marcus Schiesser 210ce35867 fix: remove cleaning the build assets (doesn't work as due to how ncc references the assets) 2023-12-28 10:38:21 +07:00
Marcus Schiesser 36905f6442 fix: CI not running on windows 2023-12-27 18:38:35 +07:00
Marcus Schiesser ed509db04a feat[e2e]: add simple check for fastapi (folder exists) 2023-12-27 18:05:44 +07:00
Marcus Schiesser 14413c0637 fix: produce clean create-llama builds 2023-12-27 17:59:29 +07:00
Marcus Schiesser 9682c95da8 fix: incorrect generation message 2023-12-27 15:21:38 +07:00
Marcus Schiesser 7c6eba90e5 fix: don't allow frontend for non-streaming 2023-12-27 15:21:38 +07:00
Marcus Schiesser c85bf225b9 fix: python packaging 2023-12-27 15:21:36 +07:00
Marcus Schiesser b51c2d66a5 fix: get embed_model from base model 2023-12-27 15:20:45 +07:00
Marcus Schiesser 935bc52239 fix: use base service context 2023-12-27 15:20:45 +07:00
thucpn 57ff51823c docs: update readme for simple template 2023-12-27 15:20:45 +07:00
thucpn 06b20a1772 fix: code review and bugs 2023-12-27 15:20:45 +07:00
thucpn 7a98255149 fix: path to typescript folder 2023-12-27 15:20:45 +07:00
thucpn 980038c711 refactor: typescript vectordb folder 2023-12-27 15:20:45 +07:00
thucpn 09d4e36200 feat: create chat engine folder for python 2023-12-27 15:20:45 +07:00
thucpn 8fb523bcef fix: use model env for all framework 2023-12-27 15:20:45 +07:00
thucpn e48a621d61 fix: use public model only for nextjs 2023-12-27 15:20:45 +07:00
thucpn 1f87787b05 refactor: context structure for simple python template 2023-12-27 15:20:45 +07:00
thucpn fb6cef8a0b docs: update env config 2023-12-27 15:20:45 +07:00
thucpn 21368f6218 feat: remove constants.ts in ts templates 2023-12-27 15:20:45 +07:00
Marcus Schiesser 116685017d feat[cl-fastapi]: test and document new fastapi structure 2023-12-27 15:20:45 +07:00
Marcus Schiesser 23082f2c5e feat[cl-fastapi]: draft for new fastapi structure (supporting engines) 2023-12-27 15:20:45 +07:00
Marcus Schiesser ff2b3ca727 fix[cl-fastapi]: use json for request content-type (and update llama-index) 2023-12-27 15:20:45 +07:00
Marcus Schiesser e55d41f5df fix: don't include python caches to npm 2023-12-22 16:22:34 +07:00
Marcus Schiesser 91fb5101d6 refactor: don't check in idea projects 2023-12-22 15:34:09 +07:00
Marcus Schiesser 9c5e22a656 docs: added changesets for create-llama 2023-12-22 15:34:09 +07:00
Marcus Schiesser 18f23b298e feat: add /api/chat e2e test (uses openai key) (#287)
* feat: allow custom external port

---------

Co-authored-by: thucpn <thucsh2@gmail.com>
2023-12-22 12:49:13 +07:00
Alex Yang ddf39ebeaa refactor: sentence split (#290)
Co-authored-by: Marcus Schiesser <mail@marcusschiesser.de>
2023-12-21 12:36:43 -06:00
Alex Yang 320b515e7d fix: align separator with llama_index (#289) 2023-12-20 13:15:14 -06:00
Marcus Schiesser 04c50ee946 Feat: Removed pdf-parse, and directly use latest pdf.js (#288) 2023-12-20 17:13:26 +08:00
Marcus Schiesser 3d626d68aa llamaindex@0.0.40 2023-12-18 17:50:12 +07:00
Marcus Schiesser 9c0442bdb5 filter docs for publishing package 2023-12-18 17:44:19 +07:00
Marcus Schiesser 606ffa40d1 docs: add astradb changeset 2023-12-18 17:29:28 +07:00
Marcus Schiesser e9f6de1238 feat: ensure retriever returns an image and send it to the LLM base64 encoded 2023-12-18 17:20:56 +07:00
Marcus Schiesser 8110ab98b6 feat: added mm-rag example and started the response synthesis for it 2023-12-18 17:20:56 +07:00
Marcus Schiesser b8c4bd70ae refactor: improve DX using image vector stores 2023-12-18 17:20:56 +07:00
Marcus Schiesser 2e49856621 refactor: moved multi-modal examples 2023-12-18 17:20:56 +07:00
Marcus Schiesser 2039509811 fix: bugs with persisting and loading image vector stores 2023-12-18 17:20:56 +07:00
Thuc Pham 420f2ddeb7 Fix: npm script does not run in window machine (#283) 2023-12-18 16:43:53 +08:00
Marcus Schiesser afc0516868 add RAG to mistral example 2023-12-18 14:52:37 +07:00
Marcus Schiesser 02a0f5e96c Feat: Add vector DB to create-llama (starting with MongoDB) (#279)
* feat: add selection for vector DB
* feat: add mongo datasource 
* fix: remove not implemented vector dbs

---------

Co-authored-by: Thuc Pham <51660321+thucpn@users.noreply.github.com>
2023-12-15 16:49:00 +08:00
Thuc Pham 2f7b05006b Fix/express app can not parse request json body (#17) 2023-12-14 14:16:25 +07:00
thucpn 314089b0a1 feat: option to select model for express 2023-12-14 14:16:25 +07:00
Mike Fortman 60e626d6d0 Update Astra client and associated type changes (#277) 2023-12-14 10:54:29 +08:00
yisding 5c2050ebcf 0.0.39 2023-12-12 18:22:29 -08:00
355 changed files with 58569 additions and 62799 deletions
-5
View File
@@ -1,5 +0,0 @@
---
"llamaindex": patch
---
Added support for MistralAI (LLM and Embeddings)
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"commit": true,
"fixed": [],
"linked": [],
"access": "public",
-5
View File
@@ -1,5 +0,0 @@
---
"llamaindex": patch
---
Add support for AstraDB vector store
+5
View File
@@ -0,0 +1,5 @@
---
"create-llama": patch
---
Added option to automatically install dependencies (for Python and TS)
+15 -1
View File
@@ -8,6 +8,9 @@ on:
- ".github/workflows/e2e.yml"
branches: [main]
env:
POETRY_VERSION: "1.6.1"
jobs:
e2e:
name: create-llama
@@ -16,10 +19,19 @@ jobs:
fail-fast: true
matrix:
node-version: [18, 20]
os: [macos-latest] # add windows-latest after timeout issue is fixed (see https://github.com/run-llama/LlamaIndexTS/issues/263)
python-version: ["3.11"]
os: [macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: ${{ env.POETRY_VERSION }}
- uses: pnpm/action-setup@v2
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
@@ -36,6 +48,8 @@ jobs:
working-directory: ./packages/create-llama
- name: Run Playwright tests
run: pnpm exec playwright test
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
working-directory: ./packages/create-llama
- uses: actions/upload-artifact@v3
if: always()
+3 -1
View File
@@ -17,9 +17,11 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Run lint
run: pnpm run lint
- name: Run Prettier
run: pnpm run format
+19 -1
View File
@@ -12,9 +12,27 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version-file: ".nvmrc"
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Run tests
run: pnpm run test
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm run build
working-directory: ./packages/core
- name: Run Type Check
run: pnpm run type-check
+4
View File
@@ -37,6 +37,7 @@ yarn-error.log*
.vercel
dist/
lib/
# vs code
.vscode/launch.json
@@ -46,3 +47,6 @@ test-results/
playwright-report/
blob-report/
playwright/.cache/
# intellij
**/.idea
+1
View File
@@ -1,5 +1,6 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
pnpm format
pnpm lint
npx lint-staged
+4
View File
@@ -0,0 +1,4 @@
apps/docs/i18n
pnpm-lock.yaml
lib/
dist/
+5 -2
View File
@@ -5,5 +5,8 @@
"[xml]": {
"editor.defaultFormatter": "redhat.vscode-xml"
},
"jest.rootPath": "./packages/core"
}
"jest.rootPath": "./packages/core",
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
}
}
+3 -3
View File
@@ -8,7 +8,7 @@ Right now there are two packages of importance:
packages/core which is the main NPM library llamaindex
apps/simple is where the demo code lives
examples is where the demo code lives
### Turborepo docs
@@ -47,7 +47,7 @@ We use Jest https://jestjs.io/ to write our test cases. Jest comes with a bunch
### Demo applications
There is an existing ["simple"](/apps/simple/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 core package with a new demo, you need to run the build command in the README.
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 core 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
@@ -56,7 +56,7 @@ You can create new demo applications in the apps folder. Just run pnpm init in t
To install packages for a specific package or demo application, run
```
pnpm add [NPM Package] --filter [package or application i.e. core or simple]
pnpm add [NPM Package] --filter [package or application i.e. core or docs]
```
To install packages for every package or application run
+5 -3
View File
@@ -1,5 +1,10 @@
# LlamaIndex.TS
[![NPM Version](https://img.shields.io/npm/v/llamaindex)](https://www.npmjs.com/package/llamaindex)
[![NPM License](https://img.shields.io/npm/l/llamaindex)](https://www.npmjs.com/package/llamaindex)
[![NPM Downloads](https://img.shields.io/npm/dm/llamaindex)](https://www.npmjs.com/package/llamaindex)
[![Discord](https://img.shields.io/discord/1059199217496772688)](https://discord.com/invite/eN6D2HQ4aX)
LlamaIndex is a data framework for your LLM application.
Use your own data with large language models (LLMs, OpenAI ChatGPT and others) in Typescript and Javascript.
@@ -105,9 +110,6 @@ const nextConfig = {
};
return config;
},
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // Puts pdf-parse in actual NodeJS mode with NextJS App Router
},
};
module.exports = nextConfig;
+3
View File
@@ -0,0 +1,3 @@
# Rename this file to `.env.local` to use environment variables locally with `next dev`
# https://nextjs.org/docs/pages/building-your-application/configuring/environment-variables
MY_HOST="example.com"
+30
View File
@@ -0,0 +1,30 @@
This is a [LlamaIndex](https://www.llamaindex.ai/) project using [Next.js](https://nextjs.org/) bootstrapped with [`create-llama`](https://github.com/run-llama/LlamaIndexTS/tree/main/packages/create-llama).
## Getting Started
First, install the dependencies:
```
npm install
```
Second, run the development server:
```
npm run dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
## Learn More
To learn more about LlamaIndex, take a look at the following resources:
- [LlamaIndex Documentation](https://docs.llamaindex.ai) - learn about LlamaIndex (Python features).
- [LlamaIndexTS Documentation](https://ts.llamaindex.ai) - learn about LlamaIndex (Typescript features).
You can check out [the LlamaIndexTS GitHub repository](https://github.com/run-llama/LlamaIndexTS) - your feedback and contributions are welcome!
@@ -0,0 +1,59 @@
import {
ContextChatEngine,
LLM,
SimpleDocumentStore,
VectorStoreIndex,
genericFileSystem,
serviceContextFromDefaults,
storageContextFromDefaults,
} from "llamaindex";
import { CHUNK_OVERLAP, CHUNK_SIZE, STORAGE_CACHE_DIR } from "./constants.mjs";
async function getDataSource(llm: LLM) {
const fs = genericFileSystem;
await fs.writeFile(
`${STORAGE_CACHE_DIR}/doc_store.json`,
JSON.stringify(await import("../../../../cache/doc_store.json")),
);
await fs.writeFile(
`${STORAGE_CACHE_DIR}/index_store.json`,
JSON.stringify(await import("../../../../cache/index_store.json")),
);
await fs.writeFile(
`${STORAGE_CACHE_DIR}/vector_store.json`,
JSON.stringify(await import("../../../../cache/vector_store.json")),
);
const serviceContext = serviceContextFromDefaults({
llm,
chunkSize: CHUNK_SIZE,
chunkOverlap: CHUNK_OVERLAP,
});
let storageContext = await storageContextFromDefaults({
persistDir: `${STORAGE_CACHE_DIR}`,
});
const numberOfDocs = Object.keys(
(storageContext.docStore as SimpleDocumentStore).toDict(),
).length;
if (numberOfDocs === 0) {
throw new Error(
`StorageContext is empty - call 'npm run generate' to generate the storage first`,
);
}
return await VectorStoreIndex.init({
storageContext,
serviceContext,
});
}
export async function createChatEngine(llm: LLM) {
const index = await getDataSource(llm);
const retriever = index.asRetriever();
retriever.similarityTopK = 5;
return new ContextChatEngine({
chatModel: llm,
retriever,
});
}
@@ -0,0 +1,66 @@
import {
JSONValue,
createCallbacksTransformer,
createStreamDataTransformer,
experimental_StreamData,
trimStartOfStreamHelper,
type AIStreamCallbacksAndOptions,
} from "ai";
type ParserOptions = {
image_url?: string;
};
function createParser(
res: AsyncGenerator<any>,
data: experimental_StreamData,
opts?: ParserOptions,
) {
const trimStartOfStream = trimStartOfStreamHelper();
return new ReadableStream<string>({
start() {
// if image_url is provided, send it via the data stream
if (opts?.image_url) {
const message: JSONValue = {
type: "image_url",
image_url: {
url: opts.image_url,
},
};
data.append(message);
} else {
data.append({}); // send an empty image response for the user's message
}
},
async pull(controller): Promise<void> {
const { value, done } = await res.next();
if (done) {
controller.close();
data.append({}); // send an empty image response for the assistant's message
data.close();
return;
}
const text = trimStartOfStream(value ?? "");
if (text) {
controller.enqueue(text);
}
},
});
}
export function LlamaIndexStream(
res: AsyncGenerator<any>,
opts?: {
callbacks?: AIStreamCallbacksAndOptions;
parserOptions?: ParserOptions;
},
): { stream: ReadableStream; data: experimental_StreamData } {
const data = new experimental_StreamData();
return {
stream: createParser(res, data, opts?.parserOptions)
.pipeThrough(createCallbacksTransformer(opts?.callbacks))
.pipeThrough(createStreamDataTransformer(true)),
data,
};
}
@@ -0,0 +1,82 @@
import { Message, StreamingTextResponse } from "ai";
import { ChatMessage, MessageContent, OpenAI } from "llamaindex";
import { NextRequest, NextResponse } from "next/server";
import { createChatEngine } from "./engine";
import { LlamaIndexStream } from "./llamaindex-stream";
export const runtime = "edge";
export const dynamic = "force-dynamic";
const getLastMessageContent = (
textMessage: string,
imageUrl: string | undefined,
): MessageContent => {
if (!imageUrl) return textMessage;
return [
{
type: "text",
text: textMessage,
},
{
type: "image_url",
image_url: {
url: imageUrl,
},
},
];
};
export async function POST(request: NextRequest) {
try {
const body = await request.json();
const { messages, data }: { messages: Message[]; data: any } = body;
const lastMessage = messages.pop();
if (!messages || !lastMessage || lastMessage.role !== "user") {
return NextResponse.json(
{
error:
"messages are required in the request body and the last message must be from the user",
},
{ status: 400 },
);
}
const llm = new OpenAI({
model: (process.env.MODEL as any) ?? "gpt-3.5-turbo",
maxTokens: 512,
});
const chatEngine = await createChatEngine(llm);
const lastMessageContent = getLastMessageContent(
lastMessage.content,
data?.imageUrl,
);
const response = await chatEngine.chat(
lastMessageContent as MessageContent,
messages as ChatMessage[],
true,
);
// Transform the response into a readable stream
const { stream, data: streamData } = LlamaIndexStream(response, {
parserOptions: {
image_url: data?.imageUrl,
},
});
// Return a StreamingTextResponse, which can be consumed by the client
return new StreamingTextResponse(stream, {}, streamData);
} catch (error) {
console.error("[LlamaIndex]", error);
return NextResponse.json(
{
error: (error as Error).message,
},
{
status: 500,
},
);
}
}
@@ -0,0 +1,46 @@
"use client";
import { useChat } from "ai/react";
import { useMemo } from "react";
import { insertDataIntoMessages } from "./transform";
import { ChatInput, ChatMessages } from "./ui/chat";
export default function ChatSection() {
const {
messages,
input,
isLoading,
handleSubmit,
handleInputChange,
reload,
stop,
data,
} = useChat({
api: process.env.NEXT_PUBLIC_CHAT_API,
headers: {
"Content-Type": "application/json", // using JSON because of vercel/ai 2.2.26
},
});
const transformedMessages = useMemo(() => {
return insertDataIntoMessages(messages, data);
}, [messages, data]);
return (
<div className="space-y-4 max-w-5xl w-full">
<ChatMessages
messages={transformedMessages}
isLoading={isLoading}
reload={reload}
stop={stop}
/>
<ChatInput
input={input}
handleSubmit={handleSubmit}
handleInputChange={handleInputChange}
isLoading={isLoading}
multiModal={process.env.NEXT_PUBLIC_MODEL === "gpt-4-vision-preview"}
/>
</div>
);
}
@@ -0,0 +1,28 @@
import Image from "next/image";
export default function Header() {
return (
<div className="z-10 max-w-5xl w-full items-center justify-between font-mono text-sm lg:flex">
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
Get started by editing&nbsp;
<code className="font-mono font-bold">app/page.tsx</code>
</p>
<div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:h-auto lg:w-auto lg:bg-none">
<a
href="https://www.llamaindex.ai/"
className="flex items-center justify-center font-nunito text-lg font-bold gap-2"
>
<span>Built by LlamaIndex</span>
<Image
className="rounded-xl"
src="/llama.png"
alt="Llama Logo"
width={40}
height={40}
priority
/>
</a>
</div>
</div>
);
}
@@ -0,0 +1,19 @@
import { JSONValue, Message } from "ai";
export const isValidMessageData = (rawData: JSONValue | undefined) => {
if (!rawData || typeof rawData !== "object") return false;
if (Object.keys(rawData).length === 0) return false;
return true;
};
export const insertDataIntoMessages = (
messages: Message[],
data: JSONValue[] | undefined,
) => {
if (!data) return messages;
messages.forEach((message, i) => {
const rawData = data[i];
if (isValidMessageData(rawData)) message.data = rawData;
});
return messages;
};
@@ -0,0 +1,34 @@
"use client";
import Image from "next/image";
import { Message } from "./chat-messages";
export default function ChatAvatar(message: Message) {
if (message.role === "user") {
return (
<div className="flex h-8 w-8 shrink-0 select-none items-center justify-center rounded-md border shadow bg-background">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 256 256"
fill="currentColor"
className="h-4 w-4"
>
<path d="M230.92 212c-15.23-26.33-38.7-45.21-66.09-54.16a72 72 0 1 0-73.66 0c-27.39 8.94-50.86 27.82-66.09 54.16a8 8 0 1 0 13.85 8c18.84-32.56 52.14-52 89.07-52s70.23 19.44 89.07 52a8 8 0 1 0 13.85-8ZM72 96a56 56 0 1 1 56 56 56.06 56.06 0 0 1-56-56Z"></path>
</svg>
</div>
);
}
return (
<div className="flex h-8 w-8 shrink-0 select-none items-center justify-center rounded-md border bg-black text-white">
<Image
className="rounded-md"
src="/llama.png"
alt="Llama Logo"
width={24}
height={24}
priority
/>
</div>
);
}
@@ -0,0 +1,43 @@
"use client";
export interface ChatInputProps {
/** The current value of the input */
input?: string;
/** An input/textarea-ready onChange handler to control the value of the input */
handleInputChange?: (
e:
| React.ChangeEvent<HTMLInputElement>
| React.ChangeEvent<HTMLTextAreaElement>,
) => void;
/** Form submission handler to automatically reset input and append a user message */
handleSubmit: (e: React.FormEvent<HTMLFormElement>) => void;
isLoading: boolean;
multiModal?: boolean;
}
export default function ChatInput(props: ChatInputProps) {
return (
<>
<form
onSubmit={props.handleSubmit}
className="flex items-start justify-between w-full max-w-5xl p-4 bg-white rounded-xl shadow-xl gap-4"
>
<input
autoFocus
name="message"
placeholder="Type a message"
className="w-full p-4 rounded-xl shadow-inner flex-1"
value={props.input}
onChange={props.handleInputChange}
/>
<button
disabled={props.isLoading}
type="submit"
className="p-4 text-white rounded-xl shadow-xl bg-gradient-to-r from-cyan-500 to-sky-500 disabled:opacity-50 disabled:cursor-not-allowed"
>
Send message
</button>
</form>
</>
);
}
@@ -0,0 +1,13 @@
"use client";
import ChatAvatar from "./chat-avatar";
import { Message } from "./chat-messages";
export default function ChatItem(message: Message) {
return (
<div className="flex items-start gap-4 pt-5">
<ChatAvatar {...message} />
<p className="break-words">{message.content}</p>
</div>
);
}
@@ -0,0 +1,48 @@
"use client";
import { useEffect, useRef } from "react";
import ChatItem from "./chat-item";
export interface Message {
id: string;
content: string;
role: string;
}
export default function ChatMessages({
messages,
isLoading,
reload,
stop,
}: {
messages: Message[];
isLoading?: boolean;
stop?: () => void;
reload?: () => void;
}) {
const scrollableChatContainerRef = useRef<HTMLDivElement>(null);
const scrollToBottom = () => {
if (scrollableChatContainerRef.current) {
scrollableChatContainerRef.current.scrollTop =
scrollableChatContainerRef.current.scrollHeight;
}
};
useEffect(() => {
scrollToBottom();
}, [messages.length]);
return (
<div className="w-full max-w-5xl p-4 bg-white rounded-xl shadow-xl">
<div
className="flex flex-col gap-5 divide-y h-[50vh] overflow-auto"
ref={scrollableChatContainerRef}
>
{messages.map((m: Message) => (
<ChatItem key={m.id} {...m} />
))}
</div>
</div>
);
}
@@ -0,0 +1,6 @@
import ChatInput from "./chat-input";
import ChatMessages from "./chat-messages";
export type { ChatInputProps } from "./chat-input";
export type { Message } from "./chat-messages";
export { ChatInput, ChatMessages };
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

+94
View File
@@ -0,0 +1,94 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 222.2 47.4% 11.2%;
--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;
--popover: 0 0% 100%;
--popover-foreground: 222.2 47.4% 11.2%;
--border: 214.3 31.8% 91.4%;
--input: 214.3 31.8% 91.4%;
--card: 0 0% 100%;
--card-foreground: 222.2 47.4% 11.2%;
--primary: 222.2 47.4% 11.2%;
--primary-foreground: 210 40% 98%;
--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;
--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;
--destructive: 0 100% 50%;
--destructive-foreground: 210 40% 98%;
--ring: 215 20.2% 65.1%;
--radius: 0.5rem;
}
.dark {
--background: 224 71% 4%;
--foreground: 213 31% 91%;
--muted: 223 47% 11%;
--muted-foreground: 215.4 16.3% 56.9%;
--accent: 216 34% 17%;
--accent-foreground: 210 40% 98%;
--popover: 224 71% 4%;
--popover-foreground: 215 20.2% 65.1%;
--border: 216 34% 17%;
--input: 216 34% 17%;
--card: 224 71% 4%;
--card-foreground: 213 31% 91%;
--primary: 210 40% 98%;
--primary-foreground: 222.2 47.4% 1.2%;
--secondary: 222.2 47.4% 11.2%;
--secondary-foreground: 210 40% 98%;
--destructive: 0 63% 31%;
--destructive-foreground: 210 40% 98%;
--ring: 216 34% 17%;
--radius: 0.5rem;
}
}
@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
font-feature-settings:
"rlig" 1,
"calt" 1;
}
.background-gradient {
background-color: #fff;
background-image: radial-gradient(
at 21% 11%,
rgba(186, 186, 233, 0.53) 0,
transparent 50%
),
radial-gradient(at 85% 0, hsla(46, 57%, 78%, 0.52) 0, transparent 50%),
radial-gradient(at 91% 36%, rgba(194, 213, 255, 0.68) 0, transparent 50%),
radial-gradient(at 8% 40%, rgba(251, 218, 239, 0.46) 0, transparent 50%);
}
}
+22
View File
@@ -0,0 +1,22 @@
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
const inter = Inter({ subsets: ["latin"] });
export const metadata: Metadata = {
title: "Create Llama App",
description: "Generated by create-llama",
};
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
</html>
);
}
+11
View File
@@ -0,0 +1,11 @@
import Header from "@/app/components/header";
import ChatSection from "./components/chat-section";
export default function Home() {
return (
<main className="flex min-h-screen flex-col items-center gap-10 p-24 background-gradient">
<Header />
<ChatSection />
</main>
);
}
Binary file not shown.
+5
View File
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
+4
View File
@@ -0,0 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
module.exports = nextConfig;
+32
View File
@@ -0,0 +1,32 @@
{
"name": "demo-edge-runtime",
"version": "0.1.0",
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"generate": "node app/api/chat/engine/generate.mjs"
},
"dependencies": {
"ai": "^2.2.27",
"dotenv": "^16.3.1",
"llamaindex": "0.0.46",
"next": "^14.0.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"supports-color": "^9.4.0"
},
"devDependencies": {
"@types/node": "^20.10.3",
"@types/react": "^18.2.42",
"@types/react-dom": "^18.2.17",
"autoprefixer": "^10.4.16",
"eslint": "^8.55.0",
"eslint-config-next": "^14.0.3",
"postcss": "^8.4.32",
"tailwindcss": "^3.3.6",
"typescript": "^5.3.2",
"cross-env": "^7.0.3"
}
}
+6
View File
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

+78
View File
@@ -0,0 +1,78 @@
import type { Config } from "tailwindcss";
import { fontFamily } from "tailwindcss/defaultTheme";
const config: Config = {
darkMode: ["class"],
content: ["app/**/*.{ts,tsx}", "components/**/*.{ts,tsx}"],
theme: {
container: {
center: true,
padding: "2rem",
screens: {
"2xl": "1400px",
},
},
extend: {
colors: {
border: "hsl(var(--border))",
input: "hsl(var(--input))",
ring: "hsl(var(--ring))",
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",
primary: {
DEFAULT: "hsl(var(--primary))",
foreground: "hsl(var(--primary-foreground))",
},
secondary: {
DEFAULT: "hsl(var(--secondary))",
foreground: "hsl(var(--secondary-foreground))",
},
destructive: {
DEFAULT: "hsl(var(--destructive) / <alpha-value>)",
foreground: "hsl(var(--destructive-foreground) / <alpha-value>)",
},
muted: {
DEFAULT: "hsl(var(--muted))",
foreground: "hsl(var(--muted-foreground))",
},
accent: {
DEFAULT: "hsl(var(--accent))",
foreground: "hsl(var(--accent-foreground))",
},
popover: {
DEFAULT: "hsl(var(--popover))",
foreground: "hsl(var(--popover-foreground))",
},
card: {
DEFAULT: "hsl(var(--card))",
foreground: "hsl(var(--card-foreground))",
},
},
borderRadius: {
xl: `calc(var(--radius) + 4px)`,
lg: `var(--radius)`,
md: `calc(var(--radius) - 2px)`,
sm: "calc(var(--radius) - 4px)",
},
fontFamily: {
sans: ["var(--font-sans)", ...fontFamily.sans],
},
keyframes: {
"accordion-down": {
from: { height: "0" },
to: { height: "var(--radix-accordion-content-height)" },
},
"accordion-up": {
from: { height: "var(--radix-accordion-content-height)" },
to: { height: "0" },
},
},
animation: {
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
},
},
},
plugins: [],
};
export default config;
+28
View File
@@ -0,0 +1,28 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./*"]
},
"forceConsistentCasingInFileNames": true
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
+1
View File
@@ -7,6 +7,7 @@
# Generated files
.docusaurus
.cache-loader
lib
# Misc
.DS_Store
-14
View File
@@ -13,17 +13,3 @@ If you're using NextJS App Router route handlers/serverless functions, you'll ne
```js
export const runtime = "nodejs"; // default
```
and you'll need to add an exception for pdf-parse in your next.config.js
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // Puts pdf-parse in actual NodeJS mode with NextJS App Router
},
};
module.exports = nextConfig;
```
+1 -1
View File
@@ -37,7 +37,7 @@ For more complex applications, our lower-level APIs allow advanced users to cust
`npm install llamaindex`
Our documentation includes [Installation Instructions](./installation.md) and a [Starter Tutorial](./starter.md) to build your first application.
Our documentation includes [Installation Instructions](./installation.mdx) and a [Starter Tutorial](./starter.md) to build your first application.
Once you're up and running, [High-Level Concepts](./concepts.md) has an overview of LlamaIndex's modular architecture. For more hands-on practical examples, look through our [End-to-End Tutorials](./end_to_end.md).
@@ -35,13 +35,26 @@ const nodesWithScore: NodeWithScore[] = [
},
];
const response = await responseSynthesizer.synthesize(
"What age am I?",
const response = await responseSynthesizer.synthesize({
query: "What age am I?",
nodesWithScore,
);
});
console.log(response.response);
```
The `synthesize` function also supports streaming, just add `stream: true` as an option:
```typescript
const stream = await responseSynthesizer.synthesize({
query: "What age am I?",
nodesWithScore,
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.response);
}
```
## API Reference
- [ResponseSynthesizer](../../api/classes/ResponseSynthesizer.md)
@@ -0,0 +1 @@
label: Observability
@@ -0,0 +1,35 @@
# Observability
LlamaIndex provides **one-click observability** 🔭 to allow you to build principled LLM applications in a production setting.
A key requirement for principled development of LLM applications over your data (RAG systems, agents) is being able to observe, debug, and evaluate
your system - both as a whole and for each component.
This feature allows you to seamlessly integrate the LlamaIndex library with powerful observability/evaluation tools offered by our partners.
Configure a variable once, and you'll be able to do things like the following:
- View LLM/prompt inputs/outputs
- Ensure that the outputs of any component (LLMs, embeddings) are performing as expected
- View call traces for both indexing and querying
Each provider has similarities and differences. Take a look below for the full set of guides for each one!
## OpenLLMetry
[OpenLLMetry](https://github.com/traceloop/openllmetry-js) is an open-source project based on OpenTelemetry for tracing and monitoring
LLM applications. It connects to [all major observability platforms](https://www.traceloop.com/docs/openllmetry/integrations/introduction) and installs in minutes.
### Usage Pattern
```bash
npm install @traceloop/node-server-sdk
```
```js
import * as traceloop from "@traceloop/node-server-sdk";
traceloop.initialize({
apiKey: process.env.TRACELOOP_API_KEY,
disableBatch: true,
});
```
+17 -17
View File
@@ -30,21 +30,21 @@ const config = {
i18n: {
defaultLocale: "en",
locales: [
"en",
"zh-Hans",
"es",
"fr",
"de",
"ja",
"ko",
"pt",
"ar",
"it",
"tr",
"pl",
"nl",
"vi",
"th",
"en",
"zh-Hans",
"es",
"fr",
"de",
"ja",
"ko",
"pt",
"ar",
"it",
"tr",
"pl",
"nl",
"vi",
"th",
], // "fa", "ru", "ro", "sv", "hu", "cs", "el", "da", "fi", "he", "no", "hi", "in", "sl", "se", "sk", "uk", "bg", "hr", "lt", "lv", "et", "cat"
},
@@ -66,10 +66,10 @@ const config = {
},
blog: false,
gtag: {
trackingID: 'G-NB9B8LW9W5',
trackingID: "G-NB9B8LW9W5",
anonymizeIP: true,
},
}),
}),
],
],
@@ -15,17 +15,3 @@ sidebar_position: 5
```js
export const runtime = "nodejs"; // الافتراضي
```
وستحتاج أيضًا إلى إضافة استثناء لـ pdf-parse في next.config.js الخاص بك
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // يضع pdf-parse في وضع NodeJS الفعلي مع NextJS App Router
},
};
module.exports = nextConfig;
```
@@ -39,7 +39,7 @@ LlamaIndex.TS هو إطار بيانات لتطبيقات LLM لاستيعاب
`npm install llamaindex`
تتضمن وثائقنا [تعليمات التثبيت](./installation.md) و[دليل البداية](./starter.md) لبناء تطبيقك الأول.
تتضمن وثائقنا [تعليمات التثبيت](./installation.mdx) و[دليل البداية](./starter.md) لبناء تطبيقك الأول.
بمجرد أن تكون جاهزًا وتعمل ، يحتوي [مفاهيم عالية المستوى](./concepts.md) على نظرة عامة على الهندسة المعمارية المتعددة المستويات لـ LlamaIndex. لمزيد من الأمثلة العملية التفصيلية ، يمكنك الاطلاع على [دروس النهاية إلى النهاية](./end_to_end.md).
@@ -16,16 +16,3 @@ LlamaIndex в момента официално поддържа NodeJS 18 и No
export const runtime = "nodejs"; // по подразбиране
```
и ще трябва да добавите изключение за pdf-parse във вашия next.config.js
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // Поставя pdf-parse в реален режим на NodeJS с NextJS App Router
},
};
module.exports = nextConfig;
```
@@ -41,7 +41,7 @@ LlamaIndex.TS предоставя основен набор от инструм
`npm install llamaindex`
Документацията ни включва [Инструкции за инсталиране](./installation.md) и [Урок за начинаещи](./starter.md), за да построите първото си приложение.
Документацията ни включва [Инструкции за инсталиране](./installation.mdx) и [Урок за начинаещи](./starter.md), за да построите първото си приложение.
След като сте готови, [Високо ниво концепции](./concepts.md) представя общ преглед на модулната архитектура на LlamaIndex. За повече практически примери, разгледайте нашите [Уроци от начало до край](./end_to_end.md).
@@ -15,17 +15,3 @@ Si utilitzeu els gestors de rutes/funcions sense servidor de l'enrutador d'aplic
```js
export const runtime = "nodejs"; // per defecte
```
i haureu d'afegir una excepció per a pdf-parse al vostre next.config.js
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // Posiciona pdf-parse en el mode NodeJS real amb l'enrutador d'aplicacions NextJS
},
};
module.exports = nextConfig;
```
@@ -39,7 +39,7 @@ Per a aplicacions més complexes, les nostres API de nivell inferior permeten al
`npm install llamaindex`
La nostra documentació inclou [Instruccions d'Instal·lació](./installation.md) i un [Tutorial d'Inici](./starter.md) per a construir la vostra primera aplicació.
La nostra documentació inclou [Instruccions d'Instal·lació](./installation.mdx) i un [Tutorial d'Inici](./starter.md) per a construir la vostra primera aplicació.
Un cop tingueu tot a punt, [Conceptes de Nivell Alt](./concepts.md) ofereix una visió general de l'arquitectura modular de LlamaIndex. Per a més exemples pràctics, consulteu els nostres [Tutorials de Principi a Fi](./end_to_end.md).
@@ -15,17 +15,3 @@ Pokud používáte NextJS App Router pro zpracování tras/route a serverless fu
```js
export const runtime = "nodejs"; // výchozí hodnota
```
a budete muset přidat výjimku pro pdf-parse ve vašem next.config.js
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // Přepne pdf-parse do režimu NodeJS s NextJS App Router
},
};
module.exports = nextConfig;
```
@@ -39,7 +39,7 @@ Pro složitější aplikace naše API na nižší úrovni umožňuje pokročilý
`npm install llamaindex`
Naše dokumentace obsahuje [Návod k instalaci](./installation.md) a [Úvodní tutoriál](./starter.md) pro vytvoření vaší první aplikace.
Naše dokumentace obsahuje [Návod k instalaci](./installation.mdx) a [Úvodní tutoriál](./starter.md) pro vytvoření vaší první aplikace.
Jakmile jste připraveni, [Vysokoúrovňové koncepty](./concepts.md) poskytují přehled o modulární architektuře LlamaIndexu. Pro více praktických příkladů se podívejte na naše [Tutoriály od začátku do konce](./end_to_end.md).
@@ -15,17 +15,3 @@ Hvis du bruger NextJS App Router route handlers/serverless functions, skal du br
```js
export const runtime = "nodejs"; // standard
```
og du skal tilføje en undtagelse for pdf-parse i din next.config.js
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // Sætter pdf-parse i faktisk NodeJS-tilstand med NextJS App Router
},
};
module.exports = nextConfig;
```
@@ -39,7 +39,7 @@ Til mere komplekse applikationer giver vores API'er på lavere niveau avancerede
`npm install llamaindex`
Vores dokumentation inkluderer [Installationsinstruktioner](./installation.md) og en [Starter Tutorial](./starter.md) til at bygge din første applikation.
Vores dokumentation inkluderer [Installationsinstruktioner](./installation.mdx) og en [Starter Tutorial](./starter.md) til at bygge din første applikation.
Når du er i gang, giver [Højniveaukoncepter](./concepts.md) et overblik over LlamaIndex's modulære arkitektur. For flere praktiske eksempler, kan du kigge igennem vores [End-to-End Tutorials](./end_to_end.md).
@@ -15,17 +15,3 @@ Wenn Sie den NextJS App Router für Routen-Handler/Serverless-Funktionen verwend
```js
export const runtime = "nodejs"; // Standardwert
```
und Sie müssen eine Ausnahme für pdf-parse in Ihrer next.config.js hinzufügen:
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // Setzt pdf-parse in den tatsächlichen NodeJS-Modus mit NextJS App Router
},
};
module.exports = nextConfig;
```
@@ -39,7 +39,7 @@ Für komplexere Anwendungen ermöglichen unsere APIs auf niedrigerer Ebene fortg
`npm install llamaindex`
Unsere Dokumentation enthält [Installationsanweisungen](./installation.md) und ein [Einführungstutorial](./starter.md), um Ihre erste Anwendung zu erstellen.
Unsere Dokumentation enthält [Installationsanweisungen](./installation.mdx) und ein [Einführungstutorial](./starter.md), um Ihre erste Anwendung zu erstellen.
Sobald Sie bereit sind, bietet [High-Level-Konzepte](./concepts.md) einen Überblick über die modulare Architektur von LlamaIndex. Für praktische Beispiele schauen Sie sich unsere [End-to-End-Tutorials](./end_to_end.md) an.
@@ -15,17 +15,3 @@ sidebar_position: 5
```js
export const runtime = "nodejs"; // προεπιλογή
```
και θα πρέπει να προσθέσετε μια εξαίρεση για το pdf-parse στο next.config.js σας
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // Βάζει το pdf-parse σε πραγματική λειτουργία NodeJS με τον δρομολογητή NextJS App
},
};
module.exports = nextConfig;
```
@@ -41,7 +41,7 @@ slug: /
`npm install llamaindex`
Η τεκμηρίωσή μας περιλαμβάνει [Οδηγίες Εγκατάστασης](./installation.md) και ένα [Εισαγωγικό Εκπαιδευτικό Πρόγραμμα](./starter.md) για να δημιουργήσετε την πρώτη σας εφαρμογή.
Η τεκμηρίωσή μας περιλαμβάνει [Οδηγίες Εγκατάστασης](./installation.mdx) και ένα [Εισαγωγικό Εκπαιδευτικό Πρόγραμμα](./starter.md) για να δημιουργήσετε την πρώτη σας εφαρμογή.
Αφού ξεκινήσετε, οι [Υψηλού Επιπέδου Έννοιες](./concepts.md) παρέχουν μια επισκόπηση της μοντουλαρισμένης αρχιτεκτονικής του LlamaIndex. Για περισσότερα πρακτικά παραδείγματα, ρίξτε μια ματιά στα [Ολοκληρωμένα Εκπαιδευτικά Προγράμματα](./end_to_end.md).
@@ -15,17 +15,3 @@ Si estás utilizando los controladores de ruta/funciones sin servidor del enruta
```js
export const runtime = "nodejs"; // por defecto
```
y deberás agregar una excepción para pdf-parse en tu archivo next.config.js
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // Pone pdf-parse en el modo NodeJS real con el enrutador de aplicaciones NextJS
},
};
module.exports = nextConfig;
```
@@ -39,7 +39,7 @@ Para aplicaciones más complejas, nuestras API de nivel inferior permiten a los
`npm install llamaindex`
Nuestra documentación incluye [Instrucciones de instalación](./installation.md) y un [Tutorial de inicio](./starter.md) para construir tu primera aplicación.
Nuestra documentación incluye [Instrucciones de instalación](./installation.mdx) y un [Tutorial de inicio](./starter.md) para construir tu primera aplicación.
Una vez que estés en funcionamiento, [Conceptos de alto nivel](./concepts.md) ofrece una visión general de la arquitectura modular de LlamaIndex. Para obtener ejemplos prácticos más detallados, consulta nuestros [Tutoriales de extremo a extremo](./end_to_end.md).
@@ -15,17 +15,3 @@ Kui kasutate NextJS rakenduse marsruuteri marsruutide käsitlejaid/serverita fun
```js
export const runtime = "nodejs"; // vaikimisi
```
ja peate lisama erandi pdf-parse jaoks oma next.config.js failis
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // Paneb pdf-parse tegelikult NodeJS režiimi koos NextJS rakenduse marsruuteriga
},
};
module.exports = nextConfig;
```
@@ -39,7 +39,7 @@ Täpsemate rakenduste jaoks võimaldavad meie madalama taseme API-d edasijõudnu
`npm install llamaindex`
Meie dokumentatsioonis on [paigaldusjuhised](./installation.md) ja [algõpetus](./starter.md) oma esimese rakenduse loomiseks.
Meie dokumentatsioonis on [paigaldusjuhised](./installation.mdx) ja [algõpetus](./starter.md) oma esimese rakenduse loomiseks.
Kui olete valmis ja töötate, siis [kõrgtasemel kontseptsioonid](./concepts.md) annavad ülevaate LlamaIndexi moodularhitektuurist. Praktiliste näidete jaoks vaadake läbi meie [otsast lõpuni õpetused](./end_to_end.md).
@@ -15,17 +15,3 @@ LlamaIndex در حال حاضر به طور رسمی NodeJS 18 و NodeJS 20 را
```js
export const runtime = "nodejs"; // پیش فرض
```
و برای pdf-parse باید یک استثناء در next.config.js اضافه کنید
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // pdf-parse را در حالت واقعی NodeJS با مسیریاب برنامه NextJS قرار می دهد
},
};
module.exports = nextConfig;
```
@@ -41,7 +41,7 @@ API سطح بالای ما به کاربران مبتدی امکان استفا
`npm install llamaindex`
مستندات ما شامل [دستورالعمل نصب](./installation.md) و [آموزش شروع کار](./starter.md) برای ساخت اولین برنامه شما است.
مستندات ما شامل [دستورالعمل نصب](./installation.mdx) و [آموزش شروع کار](./starter.md) برای ساخت اولین برنامه شما است.
با راه اندازی و اجرا شدن، [مفاهیم سطح بالا](./concepts.md) یک نمای کلی از معماری ماژولار لاماایندکس را ارائه می دهد. برای مثال های عملی بیشتر، به [آموزش های پایان به پایان](./end_to_end.md) مراجعه کنید.
@@ -15,17 +15,3 @@ Jos käytät NextJS-sovelluksen reitittimen reitinkäsittelijöitä/palveluttomi
```js
export const runtime = "nodejs"; // oletusarvo
```
ja sinun tulee lisätä poikkeus pdf-parse:lle next.config.js-tiedostossasi
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // Asettaa pdf-parsen todelliseen NodeJS-tilaan NextJS-sovelluksen reitittimen kanssa
},
};
module.exports = nextConfig;
```
@@ -41,7 +41,7 @@ Monimutkaisempiin sovelluksiin tarjoamme matalamman tason API:t, jotka mahdollis
`npm install llamaindex`
Dokumentaatiostamme löydät [asennusohjeet](./installation.md) ja [aloitusopetusohjelman](./starter.md) ensimmäisen sovelluksesi rakentamiseen.
Dokumentaatiostamme löydät [asennusohjeet](./installation.mdx) ja [aloitusopetusohjelman](./starter.md) ensimmäisen sovelluksesi rakentamiseen.
Kun olet päässyt vauhtiin, [Korkean tason käsitteet](./concepts.md) antaa yleiskuvan LlamaIndexin modulaarisesta arkkitehtuurista. Lisää käytännön esimerkkejä löydät [Päästä päähän -opetusohjelmista](./end_to_end.md).
@@ -13,17 +13,3 @@ Si vous utilisez des gestionnaires de route du routeur d'application NextJS ou d
```js
export const runtime = "nodejs"; // par défaut
```
et vous devrez ajouter une exception pour pdf-parse dans votre fichier next.config.js
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // Met pdf-parse en mode NodeJS réel avec le routeur d'application NextJS
},
};
module.exports = nextConfig;
```
@@ -15,17 +15,3 @@ LlamaIndex כרגע תומך באופן רשמי ב-NodeJS 18 ו-NodeJS 20.
```js
export const runtime = "nodejs"; // ברירת מחדל
```
ועליך להוסיף יוצאת דופן עבור pdf-parse בקובץ next.config.js שלך
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // מעביר את pdf-parse למצב NodeJS האמיתי עם מסלולי הראוטר של NextJS App
},
};
module.exports = nextConfig;
```
@@ -41,7 +41,7 @@ API הרמה הגבוהה שלנו מאפשר למשתמשים מתחילים ל
`npm install llamaindex`
התיעוד שלנו כולל [הוראות התקנה](./installation.md) ו[מדריך התחלה](./starter.md) לבניית היישום הראשון שלך.
התיעוד שלנו כולל [הוראות התקנה](./installation.mdx) ו[מדריך התחלה](./starter.md) לבניית היישום הראשון שלך.
כאשר אתה מוכן ורץ, [מושגים ברמה גבוהה](./concepts.md) מציג סקירה על ארכיטקטורה מודולרית של LlamaIndex. לדוגמאות פרקטיות יותר, עיין ב[מדריכים מתקדמים מתחילה ועד סוף](./end_to_end.md).
@@ -15,17 +15,3 @@ LlamaIndex वर्तमान में NodeJS 18 और NodeJS 20 का आ
```js
export const runtime = "nodejs"; // डिफ़ॉल्ट
```
और आपको अपने next.config.js में pdf-parse के लिए एक अपवाद जोड़ने की आवश्यकता होगी
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // NextJS ऐप राउटर में pdf-parse को वास्तविक NodeJS मोड में रखता है
},
};
module.exports = nextConfig;
```
@@ -41,7 +41,7 @@ LlamaIndex.TS जावास्क्रिप्ट और TypeScript के
`npm install llamaindex`
हमारी दस्तावेज़ी में [स्थापना निर्देश](./installation.md) और [स्टार्टर ट्यूटोरियल](./starter.md) शामिल हैं, जिनका उपयोग करके आप अपना पहला एप्लिकेशन बना सकते हैं।
हमारी दस्तावेज़ी में [स्थापना निर्देश](./installation.mdx) और [स्टार्टर ट्यूटोरियल](./starter.md) शामिल हैं, जिनका उपयोग करके आप अपना पहला एप्लिकेशन बना सकते हैं।
एक बार जब आप शुरू हो जाएं, [उच्च स्तरीय अवधारणाएँ](./concepts.md) में LlamaIndex की मॉड्यूलर आर्किटेक्चर का अवलोकन है। अधिक हैंड्स-ऑन प्रैक्टिकल उदाहरणों के लिए, हमारे [एंड-टू-एंड ट्यूटोरियल](./end_to_end.md) को देखें।
@@ -15,17 +15,3 @@ Ako koristite NextJS App Router rukovatelje rutama/serverless funkcije, trebat
```js
export const runtime = "nodejs"; // zadano
```
i trebat ćete dodati iznimku za pdf-parse u vašem next.config.js
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // Stavlja pdf-parse u stvarni NodeJS način rada s NextJS App Routerom
},
};
module.exports = nextConfig;
```
@@ -39,7 +39,7 @@ Za složenije aplikacije, naše API-je niže razine omogućuju naprednim korisni
`npm install llamaindex`
Naša dokumentacija uključuje [Upute za instalaciju](./installation.md) i [Uvodni vodič](./starter.md) za izgradnju vaše prve aplikacije.
Naša dokumentacija uključuje [Upute za instalaciju](./installation.mdx) i [Uvodni vodič](./starter.md) za izgradnju vaše prve aplikacije.
Kada ste spremni za rad, [Visokorazinski koncepti](./concepts.md) pružaju pregled modularne arhitekture LlamaIndex-a. Za praktične primjere, pogledajte naše [Vodiče od početka do kraja](./end_to_end.md).
@@ -15,17 +15,3 @@ Ha a NextJS alkalmazás útválasztó útválasztó kezelőket/szerver nélküli
```js
export const runtime = "nodejs"; // alapértelmezett
```
és hozzá kell adnia egy kivételt a pdf-parse-hez a next.config.js fájlban
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // A pdf-parse-t valódi NodeJS módban helyezi el a NextJS alkalmazás útválasztó
},
};
module.exports = nextConfig;
```
@@ -39,7 +39,7 @@ A komplexebb alkalmazásokhoz a mélyebb szintű API-k lehetővé teszik a halad
`npm install llamaindex`
A dokumentációnk tartalmazza a [Telepítési utasításokat](./installation.md) és egy [Kezdő útmutatót](./starter.md) az első alkalmazás létrehozásához.
A dokumentációnk tartalmazza a [Telepítési utasításokat](./installation.mdx) és egy [Kezdő útmutatót](./starter.md) az első alkalmazás létrehozásához.
Miután elindultál, a [Magas szintű fogalmak](./concepts.md) áttekintést ad a LlamaIndex moduláris architektúrájáról. További gyakorlati példákért tekintsd meg az [End-to-End útmutatóinkat](./end_to_end.md).
@@ -16,16 +16,3 @@ Jika Anda menggunakan penangan rute/handler serverless NextJS App Router, Anda p
export const runtime = "nodejs"; // default
```
dan Anda perlu menambahkan pengecualian untuk pdf-parse di next.config.js Anda
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // Menempatkan pdf-parse dalam mode NodeJS sebenarnya dengan NextJS App Router
},
};
module.exports = nextConfig;
```
@@ -39,7 +39,7 @@ Untuk aplikasi yang lebih kompleks, API tingkat lebih rendah kami memungkinkan p
`npm install llamaindex`
Dokumentasi kami mencakup [Instruksi Instalasi](./installation.md) dan [Tutorial Awal](./starter.md) untuk membangun aplikasi pertama Anda.
Dokumentasi kami mencakup [Instruksi Instalasi](./installation.mdx) dan [Tutorial Awal](./starter.md) untuk membangun aplikasi pertama Anda.
Setelah Anda mulai, [Konsep Tingkat Tinggi](./concepts.md) memberikan gambaran tentang arsitektur modular LlamaIndex. Untuk contoh praktis yang lebih mendalam, lihat [Tutorial End-to-End](./end_to_end.md).
@@ -15,17 +15,3 @@ Se stai utilizzando i gestori di route/router dell'app NextJS, dovrai utilizzare
```js
export const runtime = "nodejs"; // predefinito
```
e dovrai aggiungere un'eccezione per pdf-parse nel tuo next.config.js
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // Mette pdf-parse nella modalità NodeJS effettiva con il router dell'app NextJS
},
};
module.exports = nextConfig;
```
@@ -39,7 +39,7 @@ Per applicazioni più complesse, le nostre API di livello inferiore consentono a
`npm install llamaindex`
La nostra documentazione include le [Istruzioni di installazione](./installation.md) e un [Tutorial introduttivo](./starter.md) per creare la tua prima applicazione.
La nostra documentazione include le [Istruzioni di installazione](./installation.mdx) e un [Tutorial introduttivo](./starter.md) per creare la tua prima applicazione.
Una volta che sei pronto, i [Concetti di alto livello](./concepts.md) offrono una panoramica dell'architettura modulare di LlamaIndex. Per ulteriori esempi pratici, consulta i nostri [Tutorial end-to-end](./end_to_end.md).
@@ -15,17 +15,3 @@ NextJSアプリケーションルーターのルートハンドラー/サーバ
```js
export const runtime = "nodejs"; // デフォルト
```
また、next.config.jsでpdf-parseの例外を追加する必要があります。
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // pdf-parseを実際のNodeJSモードに配置するためのNextJSアプリケーションルーター
},
};
module.exports = nextConfig;
```
@@ -39,7 +39,7 @@ LlamaIndex.TSは、JavaScriptとTypeScriptを使用してLLMアプリを構築
`npm install llamaindex`
私たちのドキュメントには、[インストール手順](./installation.md)と[スターターチュートリアル](./starter.md)が含まれており、最初のアプリケーションの構築をサポートします。
私たちのドキュメントには、[インストール手順](./installation.mdx)と[スターターチュートリアル](./starter.md)が含まれており、最初のアプリケーションの構築をサポートします。
一度準備ができたら、[ハイレベルなコンセプト](./concepts.md)では、LlamaIndexのモジュラーアーキテクチャの概要を説明しています。より実践的な例については、[エンドツーエンドのチュートリアル](./end_to_end.md)を参照してください。
@@ -15,17 +15,3 @@ NextJS 앱 라우터 라우트 핸들러/서버리스 함수를 사용하는 경
```js
export const runtime = "nodejs"; // 기본값
```
그리고 next.config.js에서 pdf-parse에 대한 예외를 추가해야합니다.
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // pdf-parse를 실제 NodeJS 모드로 NextJS 앱 라우터에 추가합니다.
},
};
module.exports = nextConfig;
```
@@ -39,7 +39,7 @@ LlamaIndex.TS는 JavaScript와 TypeScript로 LLM 앱을 개발하는 모든 사
`npm install llamaindex`
저희 문서에는 [설치 지침](./installation.md)과 [스타터 튜토리얼](./starter.md)이 포함되어 있어 첫 번째 애플리케이션을 빌드할 수 있습니다.
저희 문서에는 [설치 지침](./installation.mdx)과 [스타터 튜토리얼](./starter.md)이 포함되어 있어 첫 번째 애플리케이션을 빌드할 수 있습니다.
한 번 시작하면, [고수준 개념](./concepts.md)에서 LlamaIndex의 모듈식 아키텍처에 대한 개요를 확인할 수 있습니다. 더 많은 실전 예제를 원하신다면, [End-to-End 튜토리얼](./end_to_end.md)을 참조해주세요.
@@ -15,17 +15,3 @@ Jei naudojate NextJS Aplikacijos maršrutizatoriaus maršrutų tvarkyklės / ser
```js
export const runtime = "nodejs"; // numatytasis
```
ir turėsite pridėti išimtį pdf-parse savo next.config.js
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // Prideda pdf-parse į tikrąjį NodeJS režimą su NextJS Aplikacijos maršrutizatoriumi
},
};
module.exports = nextConfig;
```
@@ -39,7 +39,7 @@ Sudėtingesnėms programoms mūsų žemesnio lygio API leidžia pažengusiems na
`npm install llamaindex`
Mūsų dokumentacija apima [įdiegimo instrukcijas](./installation.md) ir [pradžios vadovą](./starter.md), skirtą sukurti pirmąją aplikaciją.
Mūsų dokumentacija apima [įdiegimo instrukcijas](./installation.mdx) ir [pradžios vadovą](./starter.md), skirtą sukurti pirmąją aplikaciją.
Kai jau esate paleidę, [aukšto lygio konceptai](./concepts.md) pateikia apžvalgą apie LlamaIndex modularią architektūrą. Norėdami gauti daugiau praktinių pavyzdžių, peržiūrėkite mūsų [nuo pradžių iki pabaigos vadovus](./end_to_end.md).
@@ -15,17 +15,3 @@ Ja izmantojat NextJS lietotnes maršrutētāja maršrutētājus/servera funkcija
```js
export const runtime = "nodejs"; // noklusējums
```
un jums būs jāpievieno izņēmums pdf-parse savā next.config.js failā
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // Ievieto pdf-parse faktiskajā NodeJS režīmā ar NextJS lietotnes maršrutētāju
},
};
module.exports = nextConfig;
```
@@ -41,7 +41,7 @@ Lielākām un sarežģītākām lietojumprogrammām mūsu zemāka līmeņa API
`npm install llamaindex`
Mūsu dokumentācijā ir iekļautas [Instalācijas instrukcijas](./installation.md) un [Sākuma pamācība](./starter.md), lai izveidotu savu pirmo lietojumprogrammu.
Mūsu dokumentācijā ir iekļautas [Instalācijas instrukcijas](./installation.mdx) un [Sākuma pamācība](./starter.md), lai izveidotu savu pirmo lietojumprogrammu.
Kad esat gatavs, [Augsta līmeņa koncepti](./concepts.md) sniedz pārskatu par LlamaIndex modulāro arhitektūru. Lai iegūtu vairāk praktisku piemēru, apskatiet mūsu [Galēji līdz galam pamācības](./end_to_end.md).
@@ -15,17 +15,3 @@ Als je NextJS App Router route handlers/serverless functies gebruikt, moet je de
```js
export const runtime = "nodejs"; // standaard
```
en je moet een uitzondering toevoegen voor pdf-parse in je next.config.js
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // Zet pdf-parse in de werkelijke NodeJS-modus met NextJS App Router
},
};
module.exports = nextConfig;
```
@@ -39,7 +39,7 @@ Voor complexere toepassingen stellen onze API's op lager niveau gevorderde gebru
`npm install llamaindex`
Onze documentatie bevat [Installatie-instructies](./installation.md) en een [Starterzelfstudie](./starter.md) om uw eerste toepassing te bouwen.
Onze documentatie bevat [Installatie-instructies](./installation.mdx) en een [Starterzelfstudie](./starter.md) om uw eerste toepassing te bouwen.
Zodra u aan de slag bent, geeft [Hoog-niveau Concepten](./concepts.md) een overzicht van de modulaire architectuur van LlamaIndex. Voor meer praktische voorbeelden kunt u onze [End-to-End Tutorials](./end_to_end.md) bekijken.
@@ -15,17 +15,3 @@ Hvis du bruker NextJS App Router rutehåndterere/serverløse funksjoner, må du
```js
export const runtime = "nodejs"; // standard
```
og du må legge til et unntak for pdf-parse i next.config.js-filen din
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // Setter pdf-parse i faktisk NodeJS-modus med NextJS App Router
},
};
module.exports = nextConfig;
```
@@ -39,7 +39,7 @@ For mer komplekse applikasjoner lar våre lavnivå-APIer avanserte brukere tilpa
`npm install llamaindex`
Dokumentasjonen vår inkluderer [Installasjonsinstruksjoner](./installation.md) og en [Starterveiledning](./starter.md) for å bygge din første applikasjon.
Dokumentasjonen vår inkluderer [Installasjonsinstruksjoner](./installation.mdx) og en [Starterveiledning](./starter.md) for å bygge din første applikasjon.
Når du er oppe og kjører, gir [Høynivåkonsepter](./concepts.md) en oversikt over LlamaIndex sin modulære arkitektur. For mer praktiske eksempler, kan du se gjennom våre [End-to-End veiledninger](./end_to_end.md).
@@ -15,17 +15,3 @@ Jeśli korzystasz z obsługi trasowania NextJS App Router lub funkcji bezserwero
```js
export const runtime = "nodejs"; // domyślnie
```
i będziesz musiał dodać wyjątek dla pdf-parse w pliku next.config.js
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // Umieszcza pdf-parse w rzeczywistym trybie NodeJS z NextJS App Router
},
};
module.exports = nextConfig;
```
@@ -39,7 +39,7 @@ Dla bardziej zaawansowanych aplikacji nasze API na niższym poziomie umożliwia
`npm install llamaindex`
Nasza dokumentacja zawiera [Instrukcje instalacji](./installation.md) oraz [Samouczek dla początkujących](./starter.md), który pomoże Ci zbudować swoją pierwszą aplikację.
Nasza dokumentacja zawiera [Instrukcje instalacji](./installation.mdx) oraz [Samouczek dla początkujących](./starter.md), który pomoże Ci zbudować swoją pierwszą aplikację.
Gdy już będziesz gotowy, [Wysokopoziomowe koncepcje](./concepts.md) zawierają przegląd modułowej architektury LlamaIndex. Jeśli chcesz zobaczyć praktyczne przykłady, zapoznaj się z naszymi [Samouczkami od początku do końca](./end_to_end.md).
@@ -15,17 +15,3 @@ Se você estiver usando os manipuladores de rota/funções serverless do Roteado
```js
export const runtime = "nodejs"; // padrão
```
e você precisará adicionar uma exceção para o pdf-parse no seu next.config.js
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // Coloca o pdf-parse no modo NodeJS real com o Roteador de Aplicativos NextJS
},
};
module.exports = nextConfig;
```
@@ -39,7 +39,7 @@ Para aplicativos mais complexos, nossas APIs de nível inferior permitem que usu
`npm install llamaindex`
Nossa documentação inclui [Instruções de Instalação](./installation.md) e um [Tutorial Inicial](./starter.md) para construir seu primeiro aplicativo.
Nossa documentação inclui [Instruções de Instalação](./installation.mdx) e um [Tutorial Inicial](./starter.md) para construir seu primeiro aplicativo.
Depois de estar pronto para começar, [Conceitos de Alto Nível](./concepts.md) oferece uma visão geral da arquitetura modular do LlamaIndex. Para exemplos práticos mais detalhados, consulte nossos [Tutoriais de Ponta a Ponta](./end_to_end.md).
@@ -15,17 +15,3 @@ Dacă utilizați handler-ele de rute/funcții serverless ale Routerului aplicaț
```js
export const runtime = "nodejs"; // implicit
```
și va trebui să adăugați o excepție pentru pdf-parse în fișierul next.config.js
```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ["pdf-parse"], // Plasează pdf-parse în modul NodeJS real cu Routerul aplicației NextJS
},
};
module.exports = nextConfig;
```
@@ -39,7 +39,7 @@ Pentru aplicații mai complexe, API-urile noastre de nivel inferior permit utili
`npm install llamaindex`
Documentația noastră include [Instrucțiuni de instalare](./installation.md) și un [Tutorial de pornire](./starter.md) pentru a construi prima ta aplicație.
Documentația noastră include [Instrucțiuni de instalare](./installation.mdx) și un [Tutorial de pornire](./starter.md) pentru a construi prima ta aplicație.
Odată ce ai început, [Concepte de nivel înalt](./concepts.md) oferă o prezentare generală a arhitecturii modulare a LlamaIndex. Pentru mai multe exemple practice, consultă [Tutorialele de la cap la coadă](./end_to_end.md).

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