Compare commits

...

8 Commits

Author SHA1 Message Date
sweep-ai[bot] 205d16699d Merge main into sweep/vercel-edge-runtime-support 2023-10-18 02:56:58 +00:00
sweep-ai[bot] 41177c798d Merge main into sweep/vercel-edge-runtime-support 2023-10-17 23:13:57 +00:00
sweep-ai[bot] be79d0fd6c Merge main into sweep/vercel-edge-runtime-support 2023-10-16 16:29:23 +00:00
sweep-ai[bot] c3950e8fca Merge main into sweep/vercel-edge-runtime-support 2023-10-16 16:23:16 +00:00
sweep-ai[bot] e7770142ab Merge main into sweep/vercel-edge-runtime-support 2023-10-13 01:02:27 +00:00
sweep-ai[bot] 88c31b2c9b feat: Updated README.md 2023-10-11 08:09:58 +00:00
sweep-ai[bot] ceda4652ea feat: Updated apps/docs/docs/starter.md 2023-10-11 08:08:29 +00:00
sweep-ai[bot] 019fa024ca feat: Updated packages/eslint-config-custom/packag 2023-10-11 08:07:07 +00:00
3 changed files with 10 additions and 5 deletions
+4 -4
View File
@@ -25,14 +25,15 @@ pnpm install llamaindex
pnpm install @types/node
```
Create the file example.ts
```ts
// example.ts
import fs from "fs/promises";
import { Document, VectorStoreIndex } from "llamaindex";
import { Tiktoken } from "@dqbd/tiktoken";
async function main() {
// Initialize Tiktoken with the WASM binary file
const tiktoken = new Tiktoken({ wasmURL: '/path/to/tiktoken_bg.wasm' });
// Load essay from abramov.txt in Node
const essay = await fs.readFile(
"node_modules/llamaindex/examples/abramov.txt",
@@ -56,7 +57,6 @@ async function main() {
}
main();
```
Then you can run it using
+4
View File
@@ -20,8 +20,12 @@ Create the file `example.ts`. This code will load some example data, create a do
// example.ts
import fs from "fs/promises";
import { Document, VectorStoreIndex } from "llamaindex";
import { Tiktoken } from "@dqbd/tiktoken";
async function main() {
// Initialize Tiktoken with the WASM binary file
const tiktoken = new Tiktoken({ wasmURL: '/path/to/tiktoken_bg.wasm' });
// Load essay from abramov.txt in Node
const essay = await fs.readFile(
"node_modules/llamaindex/examples/abramov.txt",
+2 -1
View File
@@ -8,7 +8,8 @@
"eslint-config-next": "^13.4.1",
"eslint-config-prettier": "^8.3.0",
"eslint-config-turbo": "^1.9.3",
"eslint-plugin-react": "7.28.0"
"eslint-plugin-react": "7.28.0",
"@dqbd/tiktoken": "^1.0.7"
},
"publishConfig": {
"access": "public"