mirror of
https://github.com/run-llama/LlamaIndexTS.git
synced 2026-07-18 16:44:33 -04:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 726eb41359 | |||
| e9714dbfcd | |||
| a3618e761e | |||
| 24eabe7f35 | |||
| ecfa939ea6 | |||
| b48bcc3add |
@@ -14,6 +14,9 @@ concurrency:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
POSTGRES_HOST_AUTH_METHOD: trust
|
POSTGRES_HOST_AUTH_METHOD: trust
|
||||||
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||||
|
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
|
||||||
|
TURBO_REMOTE_ONLY: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
e2e:
|
e2e:
|
||||||
|
|||||||
@@ -1,5 +1,19 @@
|
|||||||
# docs
|
# docs
|
||||||
|
|
||||||
|
## 0.0.74
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [e9714db]
|
||||||
|
- llamaindex@0.6.5
|
||||||
|
|
||||||
|
## 0.0.73
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b48bcc3]
|
||||||
|
- llamaindex@0.6.4
|
||||||
|
|
||||||
## 0.0.72
|
## 0.0.72
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "docs",
|
"name": "docs",
|
||||||
"version": "0.0.72",
|
"version": "0.0.74",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docusaurus": "docusaurus",
|
"docusaurus": "docusaurus",
|
||||||
|
|||||||
@@ -40,7 +40,11 @@ async function main(args: any) {
|
|||||||
const rdr = new SimpleDirectoryReader(callback);
|
const rdr = new SimpleDirectoryReader(callback);
|
||||||
const docs = await rdr.loadData({ directoryPath: sourceDir });
|
const docs = await rdr.loadData({ directoryPath: sourceDir });
|
||||||
|
|
||||||
const pgvs = new PGVectorStore();
|
const pgvs = new PGVectorStore({
|
||||||
|
clientConfig: {
|
||||||
|
connectionString: process.env.PG_CONNECTION_STRING,
|
||||||
|
},
|
||||||
|
});
|
||||||
pgvs.setCollection(sourceDir);
|
pgvs.setCollection(sourceDir);
|
||||||
await pgvs.clearCollection();
|
await pgvs.clearCollection();
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,11 @@ async function main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const pgvs = new PGVectorStore();
|
const pgvs = new PGVectorStore({
|
||||||
|
clientConfig: {
|
||||||
|
connectionString: process.env.PG_CONNECTION_STRING,
|
||||||
|
},
|
||||||
|
});
|
||||||
// Optional - set your collection name, default is no filter on this field.
|
// Optional - set your collection name, default is no filter on this field.
|
||||||
// pgvs.setCollection();
|
// pgvs.setCollection();
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,19 @@
|
|||||||
# @llamaindex/autotool
|
# @llamaindex/autotool
|
||||||
|
|
||||||
|
## 3.0.5
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [e9714db]
|
||||||
|
- llamaindex@0.6.5
|
||||||
|
|
||||||
|
## 3.0.4
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b48bcc3]
|
||||||
|
- llamaindex@0.6.4
|
||||||
|
|
||||||
## 3.0.3
|
## 3.0.3
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,5 +1,21 @@
|
|||||||
# @llamaindex/autotool-01-node-example
|
# @llamaindex/autotool-01-node-example
|
||||||
|
|
||||||
|
## 0.0.14
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [e9714db]
|
||||||
|
- llamaindex@0.6.5
|
||||||
|
- @llamaindex/autotool@3.0.5
|
||||||
|
|
||||||
|
## 0.0.13
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b48bcc3]
|
||||||
|
- llamaindex@0.6.4
|
||||||
|
- @llamaindex/autotool@3.0.4
|
||||||
|
|
||||||
## 0.0.12
|
## 0.0.12
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -13,5 +13,5 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node --import tsx --import @llamaindex/autotool/node ./src/index.ts"
|
"start": "node --import tsx --import @llamaindex/autotool/node ./src/index.ts"
|
||||||
},
|
},
|
||||||
"version": "0.0.12"
|
"version": "0.0.14"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,21 @@
|
|||||||
# @llamaindex/autotool-02-next-example
|
# @llamaindex/autotool-02-next-example
|
||||||
|
|
||||||
|
## 0.1.58
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [e9714db]
|
||||||
|
- llamaindex@0.6.5
|
||||||
|
- @llamaindex/autotool@3.0.5
|
||||||
|
|
||||||
|
## 0.1.57
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b48bcc3]
|
||||||
|
- llamaindex@0.6.4
|
||||||
|
- @llamaindex/autotool@3.0.4
|
||||||
|
|
||||||
## 0.1.56
|
## 0.1.56
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/autotool-02-next-example",
|
"name": "@llamaindex/autotool-02-next-example",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.1.56",
|
"version": "0.1.58",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/autotool",
|
"name": "@llamaindex/autotool",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "3.0.3",
|
"version": "3.0.5",
|
||||||
"description": "auto transpile your JS function to LLM Agent compatible",
|
"description": "auto transpile your JS function to LLM Agent compatible",
|
||||||
"files": [
|
"files": [
|
||||||
"dist",
|
"dist",
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"extends": ["//"],
|
||||||
|
"tasks": {
|
||||||
|
"build": {
|
||||||
|
"outputs": ["dist/**", "src/client/**"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,13 @@
|
|||||||
# @llamaindex/community
|
# @llamaindex/community
|
||||||
|
|
||||||
|
## 0.0.38
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b48bcc3]
|
||||||
|
- @llamaindex/core@0.2.4
|
||||||
|
- @llamaindex/env@0.1.12
|
||||||
|
|
||||||
## 0.0.37
|
## 0.0.37
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/community",
|
"name": "@llamaindex/community",
|
||||||
"description": "Community package for LlamaIndexTS",
|
"description": "Community package for LlamaIndexTS",
|
||||||
"version": "0.0.37",
|
"version": "0.0.38",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"types": "dist/type/index.d.ts",
|
"types": "dist/type/index.d.ts",
|
||||||
"main": "dist/cjs/index.js",
|
"main": "dist/cjs/index.js",
|
||||||
|
|||||||
@@ -1,5 +1,16 @@
|
|||||||
# @llamaindex/core
|
# @llamaindex/core
|
||||||
|
|
||||||
|
## 0.2.4
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- b48bcc3: feat: add `load-transformers` event type when loading `@xenova/transformers` module
|
||||||
|
|
||||||
|
This would benefit user who want to customize the transformer env.
|
||||||
|
|
||||||
|
- Updated dependencies [b48bcc3]
|
||||||
|
- @llamaindex/env@0.1.12
|
||||||
|
|
||||||
## 0.2.3
|
## 0.2.3
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/core",
|
"name": "@llamaindex/core",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.2.3",
|
"version": "0.2.4",
|
||||||
"description": "LlamaIndex Core Module",
|
"description": "LlamaIndex Core Module",
|
||||||
"exports": {
|
"exports": {
|
||||||
"./node-parser": {
|
"./node-parser": {
|
||||||
|
|||||||
@@ -128,16 +128,29 @@ export class CallbackManager {
|
|||||||
dispatchEvent<K extends keyof LlamaIndexEventMaps>(
|
dispatchEvent<K extends keyof LlamaIndexEventMaps>(
|
||||||
event: K,
|
event: K,
|
||||||
detail: LlamaIndexEventMaps[K],
|
detail: LlamaIndexEventMaps[K],
|
||||||
|
sync = false,
|
||||||
) {
|
) {
|
||||||
const cbs = this.#handlers.get(event);
|
const cbs = this.#handlers.get(event);
|
||||||
if (!cbs) {
|
if (!cbs) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
queueMicrotask(() => {
|
if (typeof queueMicrotask === "undefined") {
|
||||||
|
console.warn(
|
||||||
|
"queueMicrotask is not available, dispatching synchronously",
|
||||||
|
);
|
||||||
|
sync = true;
|
||||||
|
}
|
||||||
|
if (sync) {
|
||||||
cbs.forEach((handler) =>
|
cbs.forEach((handler) =>
|
||||||
handler(LlamaIndexCustomEvent.fromEvent(event, { ...detail })),
|
handler(LlamaIndexCustomEvent.fromEvent(event, { ...detail })),
|
||||||
);
|
);
|
||||||
});
|
} else {
|
||||||
|
queueMicrotask(() => {
|
||||||
|
cbs.forEach((handler) =>
|
||||||
|
handler(LlamaIndexCustomEvent.fromEvent(event, { ...detail })),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+8
@@ -1,5 +1,13 @@
|
|||||||
# @llamaindex/env
|
# @llamaindex/env
|
||||||
|
|
||||||
|
## 0.1.12
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- b48bcc3: feat: add `load-transformers` event type when loading `@xenova/transformers` module
|
||||||
|
|
||||||
|
This would benefit user who want to customize the transformer env.
|
||||||
|
|
||||||
## 0.1.11
|
## 0.1.11
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
Vendored
+13
-2
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/env",
|
"name": "@llamaindex/env",
|
||||||
"description": "environment wrapper, supports all JS environment including node, deno, bun, edge runtime, and cloudflare worker",
|
"description": "environment wrapper, supports all JS environment including node, deno, bun, edge runtime, and cloudflare worker",
|
||||||
"version": "0.1.11",
|
"version": "0.1.12",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"types": "dist/type/index.d.ts",
|
"types": "dist/type/index.d.ts",
|
||||||
"main": "dist/cjs/index.js",
|
"main": "dist/cjs/index.js",
|
||||||
@@ -74,16 +74,18 @@
|
|||||||
"@aws-crypto/sha256-js": "^5.2.0",
|
"@aws-crypto/sha256-js": "^5.2.0",
|
||||||
"@swc/cli": "^0.4.0",
|
"@swc/cli": "^0.4.0",
|
||||||
"@swc/core": "^1.7.22",
|
"@swc/core": "^1.7.22",
|
||||||
|
"@xenova/transformers": "^2.17.2",
|
||||||
"concurrently": "^8.2.2",
|
"concurrently": "^8.2.2",
|
||||||
"pathe": "^1.1.2",
|
"pathe": "^1.1.2",
|
||||||
|
"tiktoken": "^1.0.16",
|
||||||
"vitest": "^2.0.5"
|
"vitest": "^2.0.5"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/lodash": "^4.17.7",
|
|
||||||
"@types/node": "^22.5.1"
|
"@types/node": "^22.5.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@aws-crypto/sha256-js": "^5.2.0",
|
"@aws-crypto/sha256-js": "^5.2.0",
|
||||||
|
"@xenova/transformers": "^2.17.2",
|
||||||
"js-tiktoken": "^1.0.12",
|
"js-tiktoken": "^1.0.12",
|
||||||
"pathe": "^1.1.2",
|
"pathe": "^1.1.2",
|
||||||
"tiktoken": "^1.0.15"
|
"tiktoken": "^1.0.15"
|
||||||
@@ -92,8 +94,17 @@
|
|||||||
"@aws-crypto/sha256-js": {
|
"@aws-crypto/sha256-js": {
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
|
"@xenova/transformers": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
"pathe": {
|
"pathe": {
|
||||||
"optional": true
|
"optional": true
|
||||||
|
},
|
||||||
|
"tiktoken": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"js-tiktoken": {
|
||||||
|
"optional": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+6
@@ -6,6 +6,12 @@
|
|||||||
import "./global-check.js";
|
import "./global-check.js";
|
||||||
export * from "./web-polyfill.js";
|
export * from "./web-polyfill.js";
|
||||||
|
|
||||||
|
export {
|
||||||
|
loadTransformers,
|
||||||
|
setTransformers,
|
||||||
|
type LoadTransformerEvent,
|
||||||
|
type OnLoad,
|
||||||
|
} from "./multi-model/index.browser.js";
|
||||||
export { Tokenizers, tokenizers, type Tokenizer } from "./tokenizers/js.js";
|
export { Tokenizers, tokenizers, type Tokenizer } from "./tokenizers/js.js";
|
||||||
|
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
|
|||||||
Vendored
+6
@@ -6,4 +6,10 @@
|
|||||||
import "./global-check.js";
|
import "./global-check.js";
|
||||||
export * from "./node-polyfill.js";
|
export * from "./node-polyfill.js";
|
||||||
|
|
||||||
|
export {
|
||||||
|
loadTransformers,
|
||||||
|
setTransformers,
|
||||||
|
type LoadTransformerEvent,
|
||||||
|
type OnLoad,
|
||||||
|
} from "./multi-model/index.non-nodejs.js";
|
||||||
export { Tokenizers, tokenizers, type Tokenizer } from "./tokenizers/js.js";
|
export { Tokenizers, tokenizers, type Tokenizer } from "./tokenizers/js.js";
|
||||||
|
|||||||
Vendored
+6
@@ -33,6 +33,12 @@ export function createSHA256(): SHA256 {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
loadTransformers,
|
||||||
|
setTransformers,
|
||||||
|
type LoadTransformerEvent,
|
||||||
|
type OnLoad,
|
||||||
|
} from "./multi-model/index.js";
|
||||||
export { Tokenizers, tokenizers, type Tokenizer } from "./tokenizers/node.js";
|
export { Tokenizers, tokenizers, type Tokenizer } from "./tokenizers/node.js";
|
||||||
export {
|
export {
|
||||||
AsyncLocalStorage,
|
AsyncLocalStorage,
|
||||||
|
|||||||
Vendored
+6
@@ -13,4 +13,10 @@ export function getEnv(name: string): string | undefined {
|
|||||||
return INTERNAL_ENV[name];
|
return INTERNAL_ENV[name];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
loadTransformers,
|
||||||
|
setTransformers,
|
||||||
|
type LoadTransformerEvent,
|
||||||
|
type OnLoad,
|
||||||
|
} from "./multi-model/index.non-nodejs.js";
|
||||||
export { Tokenizers, tokenizers, type Tokenizer } from "./tokenizers/js.js";
|
export { Tokenizers, tokenizers, type Tokenizer } from "./tokenizers/js.js";
|
||||||
|
|||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
import { getTransformers, setTransformers, type OnLoad } from "./shared.js";
|
||||||
|
|
||||||
|
export {
|
||||||
|
setTransformers,
|
||||||
|
type LoadTransformerEvent,
|
||||||
|
type OnLoad,
|
||||||
|
} from "./shared.js";
|
||||||
|
export async function loadTransformers(onLoad: OnLoad) {
|
||||||
|
if (getTransformers() === null) {
|
||||||
|
setTransformers(
|
||||||
|
// @ts-expect-error
|
||||||
|
await import("https://cdn.jsdelivr.net/npm/@xenova/transformers@2.17.2"),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return getTransformers()!;
|
||||||
|
}
|
||||||
|
const transformer = getTransformers()!;
|
||||||
|
onLoad(transformer);
|
||||||
|
return transformer;
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import { getTransformers, setTransformers, type OnLoad } from "./shared.js";
|
||||||
|
export {
|
||||||
|
setTransformers,
|
||||||
|
type LoadTransformerEvent,
|
||||||
|
type OnLoad,
|
||||||
|
} from "./shared.js";
|
||||||
|
|
||||||
|
export async function loadTransformers(onLoad: OnLoad) {
|
||||||
|
if (getTransformers() === null) {
|
||||||
|
/**
|
||||||
|
* If you see this warning, it means that the current environment does not support the transformer.
|
||||||
|
* because "@xeonva/transformers" highly depends on Node.js APIs.
|
||||||
|
*
|
||||||
|
* One possible solution is to fix their implementation to make it work in the non-Node.js environment,
|
||||||
|
* but it's not worth the effort because Edge Runtime and Cloudflare Workers are not the for heavy Machine Learning task.
|
||||||
|
*
|
||||||
|
* Or you can provide an RPC server that runs the transformer in a Node.js environment.
|
||||||
|
* Or you just run the code in a Node.js environment.
|
||||||
|
*
|
||||||
|
* Refs: https://github.com/xenova/transformers.js/issues/309
|
||||||
|
*/
|
||||||
|
console.warn(
|
||||||
|
'"@xenova/transformers" is not officially supported in this environment, some features may not work as expected.',
|
||||||
|
);
|
||||||
|
setTransformers(
|
||||||
|
// @ts-expect-error
|
||||||
|
await import("@xenova/transformers/dist/transformers"),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return getTransformers()!;
|
||||||
|
}
|
||||||
|
const transformer = getTransformers()!;
|
||||||
|
onLoad(transformer);
|
||||||
|
return transformer;
|
||||||
|
}
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
import { getTransformers, setTransformers, type OnLoad } from "./shared.js";
|
||||||
|
|
||||||
|
export {
|
||||||
|
setTransformers,
|
||||||
|
type LoadTransformerEvent,
|
||||||
|
type OnLoad,
|
||||||
|
} from "./shared.js";
|
||||||
|
|
||||||
|
export async function loadTransformers(onLoad: OnLoad) {
|
||||||
|
if (getTransformers() === null) {
|
||||||
|
setTransformers(await import("@xenova/transformers"));
|
||||||
|
} else {
|
||||||
|
return getTransformers()!;
|
||||||
|
}
|
||||||
|
const transformer = getTransformers()!;
|
||||||
|
|
||||||
|
onLoad(transformer);
|
||||||
|
|
||||||
|
return transformer;
|
||||||
|
}
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
let transformer: typeof import("@xenova/transformers") | null = null;
|
||||||
|
|
||||||
|
export function getTransformers() {
|
||||||
|
return transformer;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function setTransformers(t: typeof import("@xenova/transformers")) {
|
||||||
|
transformer = t;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type OnLoad = (
|
||||||
|
transformer: typeof import("@xenova/transformers"),
|
||||||
|
) => void;
|
||||||
|
|
||||||
|
export type LoadTransformerEvent = {
|
||||||
|
transformer: typeof import("@xenova/transformers");
|
||||||
|
};
|
||||||
@@ -1,5 +1,19 @@
|
|||||||
# @llamaindex/experimental
|
# @llamaindex/experimental
|
||||||
|
|
||||||
|
## 0.0.83
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [e9714db]
|
||||||
|
- llamaindex@0.6.5
|
||||||
|
|
||||||
|
## 0.0.82
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b48bcc3]
|
||||||
|
- llamaindex@0.6.4
|
||||||
|
|
||||||
## 0.0.81
|
## 0.0.81
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/experimental",
|
"name": "@llamaindex/experimental",
|
||||||
"description": "Experimental package for LlamaIndexTS",
|
"description": "Experimental package for LlamaIndexTS",
|
||||||
"version": "0.0.81",
|
"version": "0.0.83",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"types": "dist/type/index.d.ts",
|
"types": "dist/type/index.d.ts",
|
||||||
"main": "dist/cjs/index.js",
|
"main": "dist/cjs/index.js",
|
||||||
|
|||||||
@@ -1,5 +1,29 @@
|
|||||||
# llamaindex
|
# llamaindex
|
||||||
|
|
||||||
|
## 0.6.5
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- e9714db: feat: update `PGVectorStore`
|
||||||
|
|
||||||
|
- move constructor parameter `config.user` | `config.database` | `config.password` | `config.connectionString` into `config.clientConfig`
|
||||||
|
- if you pass `pg.Client` or `pg.Pool` instance to `PGVectorStore`, move it to `config.client`, setting `config.shouldConnect` to false if it's already connected
|
||||||
|
- default value of `PGVectorStore.collection` is now `"data"` instead of `""` (empty string)
|
||||||
|
|
||||||
|
## 0.6.4
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- b48bcc3: feat: add `load-transformers` event type when loading `@xenova/transformers` module
|
||||||
|
|
||||||
|
This would benefit user who want to customize the transformer env.
|
||||||
|
|
||||||
|
- Updated dependencies [b48bcc3]
|
||||||
|
- @llamaindex/core@0.2.4
|
||||||
|
- @llamaindex/env@0.1.12
|
||||||
|
- @llamaindex/openai@0.1.6
|
||||||
|
- @llamaindex/groq@0.0.5
|
||||||
|
|
||||||
## 0.6.3
|
## 0.6.3
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,5 +1,19 @@
|
|||||||
# @llamaindex/cloudflare-worker-agent-test
|
# @llamaindex/cloudflare-worker-agent-test
|
||||||
|
|
||||||
|
## 0.0.67
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [e9714db]
|
||||||
|
- llamaindex@0.6.5
|
||||||
|
|
||||||
|
## 0.0.66
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b48bcc3]
|
||||||
|
- llamaindex@0.6.4
|
||||||
|
|
||||||
## 0.0.65
|
## 0.0.65
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/cloudflare-worker-agent-test",
|
"name": "@llamaindex/cloudflare-worker-agent-test",
|
||||||
"version": "0.0.65",
|
"version": "0.0.67",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -1,5 +1,19 @@
|
|||||||
# @llamaindex/next-agent-test
|
# @llamaindex/next-agent-test
|
||||||
|
|
||||||
|
## 0.1.67
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [e9714db]
|
||||||
|
- llamaindex@0.6.5
|
||||||
|
|
||||||
|
## 0.1.66
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b48bcc3]
|
||||||
|
- llamaindex@0.6.4
|
||||||
|
|
||||||
## 0.1.65
|
## 0.1.65
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/next-agent-test",
|
"name": "@llamaindex/next-agent-test",
|
||||||
"version": "0.1.65",
|
"version": "0.1.67",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
@@ -1,5 +1,19 @@
|
|||||||
# test-edge-runtime
|
# test-edge-runtime
|
||||||
|
|
||||||
|
## 0.1.66
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [e9714db]
|
||||||
|
- llamaindex@0.6.5
|
||||||
|
|
||||||
|
## 0.1.65
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b48bcc3]
|
||||||
|
- llamaindex@0.6.4
|
||||||
|
|
||||||
## 0.1.64
|
## 0.1.64
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/nextjs-edge-runtime-test",
|
"name": "@llamaindex/nextjs-edge-runtime-test",
|
||||||
"version": "0.1.64",
|
"version": "0.1.66",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
@@ -1,107 +0,0 @@
|
|||||||
:root {
|
|
||||||
--max-width: 1100px;
|
|
||||||
--border-radius: 12px;
|
|
||||||
--font-mono: ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono",
|
|
||||||
"Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro",
|
|
||||||
"Fira Mono", "Droid Sans Mono", "Courier New", monospace;
|
|
||||||
|
|
||||||
--foreground-rgb: 0, 0, 0;
|
|
||||||
--background-start-rgb: 214, 219, 220;
|
|
||||||
--background-end-rgb: 255, 255, 255;
|
|
||||||
|
|
||||||
--primary-glow: conic-gradient(
|
|
||||||
from 180deg at 50% 50%,
|
|
||||||
#16abff33 0deg,
|
|
||||||
#0885ff33 55deg,
|
|
||||||
#54d6ff33 120deg,
|
|
||||||
#0071ff33 160deg,
|
|
||||||
transparent 360deg
|
|
||||||
);
|
|
||||||
--secondary-glow: radial-gradient(
|
|
||||||
rgba(255, 255, 255, 1),
|
|
||||||
rgba(255, 255, 255, 0)
|
|
||||||
);
|
|
||||||
|
|
||||||
--tile-start-rgb: 239, 245, 249;
|
|
||||||
--tile-end-rgb: 228, 232, 233;
|
|
||||||
--tile-border: conic-gradient(
|
|
||||||
#00000080,
|
|
||||||
#00000040,
|
|
||||||
#00000030,
|
|
||||||
#00000020,
|
|
||||||
#00000010,
|
|
||||||
#00000010,
|
|
||||||
#00000080
|
|
||||||
);
|
|
||||||
|
|
||||||
--callout-rgb: 238, 240, 241;
|
|
||||||
--callout-border-rgb: 172, 175, 176;
|
|
||||||
--card-rgb: 180, 185, 188;
|
|
||||||
--card-border-rgb: 131, 134, 135;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
:root {
|
|
||||||
--foreground-rgb: 255, 255, 255;
|
|
||||||
--background-start-rgb: 0, 0, 0;
|
|
||||||
--background-end-rgb: 0, 0, 0;
|
|
||||||
|
|
||||||
--primary-glow: radial-gradient(rgba(1, 65, 255, 0.4), rgba(1, 65, 255, 0));
|
|
||||||
--secondary-glow: linear-gradient(
|
|
||||||
to bottom right,
|
|
||||||
rgba(1, 65, 255, 0),
|
|
||||||
rgba(1, 65, 255, 0),
|
|
||||||
rgba(1, 65, 255, 0.3)
|
|
||||||
);
|
|
||||||
|
|
||||||
--tile-start-rgb: 2, 13, 46;
|
|
||||||
--tile-end-rgb: 2, 5, 19;
|
|
||||||
--tile-border: conic-gradient(
|
|
||||||
#ffffff80,
|
|
||||||
#ffffff40,
|
|
||||||
#ffffff30,
|
|
||||||
#ffffff20,
|
|
||||||
#ffffff10,
|
|
||||||
#ffffff10,
|
|
||||||
#ffffff80
|
|
||||||
);
|
|
||||||
|
|
||||||
--callout-rgb: 20, 20, 20;
|
|
||||||
--callout-border-rgb: 108, 108, 108;
|
|
||||||
--card-rgb: 100, 100, 100;
|
|
||||||
--card-border-rgb: 200, 200, 200;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
* {
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
html,
|
|
||||||
body {
|
|
||||||
max-width: 100vw;
|
|
||||||
overflow-x: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
color: rgb(var(--foreground-rgb));
|
|
||||||
background: linear-gradient(
|
|
||||||
to bottom,
|
|
||||||
transparent,
|
|
||||||
rgb(var(--background-end-rgb))
|
|
||||||
)
|
|
||||||
rgb(var(--background-start-rgb));
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: inherit;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
html {
|
|
||||||
color-scheme: dark;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// test runtime
|
// test runtime
|
||||||
import "llamaindex";
|
import "llamaindex";
|
||||||
import { ClipEmbedding } from "llamaindex/embeddings/ClipEmbedding";
|
import { ClipEmbedding } from "llamaindex";
|
||||||
import "llamaindex/readers/SimpleDirectoryReader";
|
import "llamaindex/readers/SimpleDirectoryReader";
|
||||||
|
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
|
|||||||
@@ -1,5 +1,19 @@
|
|||||||
# @llamaindex/next-node-runtime
|
# @llamaindex/next-node-runtime
|
||||||
|
|
||||||
|
## 0.0.48
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [e9714db]
|
||||||
|
- llamaindex@0.6.5
|
||||||
|
|
||||||
|
## 0.0.47
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b48bcc3]
|
||||||
|
- llamaindex@0.6.4
|
||||||
|
|
||||||
## 0.0.46
|
## 0.0.46
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/next-node-runtime-test",
|
"name": "@llamaindex/next-node-runtime-test",
|
||||||
"version": "0.0.46",
|
"version": "0.0.48",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
@@ -1,5 +1,19 @@
|
|||||||
# @llamaindex/waku-query-engine-test
|
# @llamaindex/waku-query-engine-test
|
||||||
|
|
||||||
|
## 0.0.67
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [e9714db]
|
||||||
|
- llamaindex@0.6.5
|
||||||
|
|
||||||
|
## 0.0.66
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b48bcc3]
|
||||||
|
- llamaindex@0.6.4
|
||||||
|
|
||||||
## 0.0.65
|
## 0.0.65
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/waku-query-engine-test",
|
"name": "@llamaindex/waku-query-engine-test",
|
||||||
"version": "0.0.65",
|
"version": "0.0.67",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -1,8 +1,41 @@
|
|||||||
import { ClipEmbedding, ImageNode } from "llamaindex";
|
import type { LoadTransformerEvent } from "@llamaindex/env";
|
||||||
|
import { setTransformers } from "@llamaindex/env";
|
||||||
|
import { ClipEmbedding, ImageNode, Settings } from "llamaindex";
|
||||||
import assert from "node:assert";
|
import assert from "node:assert";
|
||||||
import { test } from "node:test";
|
import { type Mock, test } from "node:test";
|
||||||
|
|
||||||
|
let callback: Mock<(event: any) => void>;
|
||||||
|
test.before(() => {
|
||||||
|
callback = test.mock.fn((event: any) => {
|
||||||
|
const { transformer } = event.detail as LoadTransformerEvent;
|
||||||
|
assert.ok(transformer);
|
||||||
|
assert.ok(transformer.env);
|
||||||
|
});
|
||||||
|
Settings.callbackManager.on("load-transformers", callback);
|
||||||
|
});
|
||||||
|
|
||||||
|
test.beforeEach(() => {
|
||||||
|
callback.mock.resetCalls();
|
||||||
|
});
|
||||||
|
|
||||||
await test("clip embedding", async (t) => {
|
await test("clip embedding", async (t) => {
|
||||||
|
await t.test("should trigger load transformer event", async () => {
|
||||||
|
const nodes = [
|
||||||
|
new ImageNode({
|
||||||
|
image: new URL(
|
||||||
|
"../../fixtures/img/llamaindex-white.png",
|
||||||
|
import.meta.url,
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
];
|
||||||
|
assert.equal(callback.mock.callCount(), 0);
|
||||||
|
const clipEmbedding = new ClipEmbedding();
|
||||||
|
assert.equal(callback.mock.callCount(), 0);
|
||||||
|
const result = await clipEmbedding(nodes);
|
||||||
|
assert.strictEqual(result.length, 1);
|
||||||
|
assert.equal(callback.mock.callCount(), 1);
|
||||||
|
});
|
||||||
|
|
||||||
await t.test("init & get image embedding", async () => {
|
await t.test("init & get image embedding", async () => {
|
||||||
const clipEmbedding = new ClipEmbedding();
|
const clipEmbedding = new ClipEmbedding();
|
||||||
const imgUrl = new URL(
|
const imgUrl = new URL(
|
||||||
@@ -27,4 +60,25 @@ await test("clip embedding", async (t) => {
|
|||||||
assert.strictEqual(result.length, 1);
|
assert.strictEqual(result.length, 1);
|
||||||
assert.ok(result[0]!.embedding);
|
assert.ok(result[0]!.embedding);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await t.test("custom transformer", async () => {
|
||||||
|
const transformers = await import("@xenova/transformers");
|
||||||
|
const getter = test.mock.fn((t, k, r) => {
|
||||||
|
return Reflect.get(t, k, r);
|
||||||
|
});
|
||||||
|
setTransformers(
|
||||||
|
new Proxy(transformers, {
|
||||||
|
get: getter,
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
const clipEmbedding = new ClipEmbedding();
|
||||||
|
const imgUrl = new URL(
|
||||||
|
"../../fixtures/img/llamaindex-white.png",
|
||||||
|
import.meta.url,
|
||||||
|
);
|
||||||
|
assert.equal(getter.mock.callCount(), 0);
|
||||||
|
const vec = await clipEmbedding.getImageEmbedding(imgUrl);
|
||||||
|
assert.ok(vec);
|
||||||
|
assert.ok(getter.mock.callCount() > 0);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -9,43 +9,54 @@ import { registerTypes } from "pgvector/pg";
|
|||||||
|
|
||||||
config({ path: [".env.local", ".env", ".env.ci"] });
|
config({ path: [".env.local", ".env", ".env.ci"] });
|
||||||
|
|
||||||
let pgClient: pg.Client | pg.Pool;
|
|
||||||
test.afterEach(async () => {
|
|
||||||
await pgClient.end();
|
|
||||||
});
|
|
||||||
|
|
||||||
const pgConfig = {
|
const pgConfig = {
|
||||||
user: process.env.POSTGRES_USER ?? "user",
|
user: process.env.POSTGRES_USER ?? "user",
|
||||||
password: process.env.POSTGRES_PASSWORD ?? "password",
|
password: process.env.POSTGRES_PASSWORD ?? "password",
|
||||||
database: "llamaindex_node_test",
|
database: "llamaindex_node_test",
|
||||||
};
|
};
|
||||||
|
|
||||||
await test("init with client", async () => {
|
await test("init with client", async (t) => {
|
||||||
pgClient = new pg.Client(pgConfig);
|
const pgClient = new pg.Client(pgConfig);
|
||||||
await pgClient.connect();
|
await pgClient.connect();
|
||||||
await pgClient.query("CREATE EXTENSION IF NOT EXISTS vector");
|
await pgClient.query("CREATE EXTENSION IF NOT EXISTS vector");
|
||||||
await registerTypes(pgClient);
|
await registerTypes(pgClient);
|
||||||
const vectorStore = new PGVectorStore(pgClient);
|
t.after(async () => {
|
||||||
|
await pgClient.end();
|
||||||
|
});
|
||||||
|
const vectorStore = new PGVectorStore({
|
||||||
|
client: pgClient,
|
||||||
|
shouldConnect: false,
|
||||||
|
});
|
||||||
assert.deepStrictEqual(await vectorStore.client(), pgClient);
|
assert.deepStrictEqual(await vectorStore.client(), pgClient);
|
||||||
});
|
});
|
||||||
|
|
||||||
await test("init with pool", async () => {
|
await test("init with pool", async (t) => {
|
||||||
pgClient = new pg.Pool(pgConfig);
|
const pgClient = new pg.Pool(pgConfig);
|
||||||
await pgClient.query("CREATE EXTENSION IF NOT EXISTS vector");
|
await pgClient.query("CREATE EXTENSION IF NOT EXISTS vector");
|
||||||
const client = await pgClient.connect();
|
const client = await pgClient.connect();
|
||||||
|
await client.query("CREATE EXTENSION IF NOT EXISTS vector");
|
||||||
await registerTypes(client);
|
await registerTypes(client);
|
||||||
const vectorStore = new PGVectorStore(client);
|
t.after(async () => {
|
||||||
|
client.release();
|
||||||
|
await pgClient.end();
|
||||||
|
});
|
||||||
|
const vectorStore = new PGVectorStore({
|
||||||
|
shouldConnect: false,
|
||||||
|
client,
|
||||||
|
});
|
||||||
assert.deepStrictEqual(await vectorStore.client(), client);
|
assert.deepStrictEqual(await vectorStore.client(), client);
|
||||||
client.release();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
await test("init without client", async () => {
|
await test("init without client", async (t) => {
|
||||||
const vectorStore = new PGVectorStore(pgConfig);
|
const vectorStore = new PGVectorStore({ clientConfig: pgConfig });
|
||||||
pgClient = (await vectorStore.client()) as pg.Client;
|
const pgClient = (await vectorStore.client()) as pg.Client;
|
||||||
|
t.after(async () => {
|
||||||
|
await pgClient.end();
|
||||||
|
});
|
||||||
assert.notDeepStrictEqual(pgClient, undefined);
|
assert.notDeepStrictEqual(pgClient, undefined);
|
||||||
});
|
});
|
||||||
|
|
||||||
await test("simple node", async () => {
|
await test("simple node", async (t) => {
|
||||||
const dimensions = 3;
|
const dimensions = 3;
|
||||||
const schemaName =
|
const schemaName =
|
||||||
"llamaindex_vector_store_test_" + Math.random().toString(36).substring(7);
|
"llamaindex_vector_store_test_" + Math.random().toString(36).substring(7);
|
||||||
@@ -56,10 +67,14 @@ await test("simple node", async () => {
|
|||||||
embedding: [0.1, 0.2, 0.3],
|
embedding: [0.1, 0.2, 0.3],
|
||||||
});
|
});
|
||||||
const vectorStore = new PGVectorStore({
|
const vectorStore = new PGVectorStore({
|
||||||
...pgConfig,
|
clientConfig: pgConfig,
|
||||||
dimensions,
|
dimensions,
|
||||||
schemaName,
|
schemaName,
|
||||||
});
|
});
|
||||||
|
const pgClient = (await vectorStore.client()) as pg.Client;
|
||||||
|
t.after(async () => {
|
||||||
|
await pgClient.end();
|
||||||
|
});
|
||||||
|
|
||||||
await vectorStore.add([node]);
|
await vectorStore.add([node]);
|
||||||
|
|
||||||
@@ -89,6 +104,4 @@ await test("simple node", async () => {
|
|||||||
});
|
});
|
||||||
assert.deepStrictEqual(result.nodes, []);
|
assert.deepStrictEqual(result.nodes, []);
|
||||||
}
|
}
|
||||||
|
|
||||||
pgClient = (await vectorStore.client()) as pg.Client;
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "llamaindex",
|
"name": "llamaindex",
|
||||||
"version": "0.6.3",
|
"version": "0.6.5",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@@ -33,8 +33,8 @@
|
|||||||
"@llamaindex/cloud": "workspace:*",
|
"@llamaindex/cloud": "workspace:*",
|
||||||
"@llamaindex/core": "workspace:*",
|
"@llamaindex/core": "workspace:*",
|
||||||
"@llamaindex/env": "workspace:*",
|
"@llamaindex/env": "workspace:*",
|
||||||
"@llamaindex/openai": "workspace:*",
|
|
||||||
"@llamaindex/groq": "workspace:*",
|
"@llamaindex/groq": "workspace:*",
|
||||||
|
"@llamaindex/openai": "workspace:*",
|
||||||
"@mistralai/mistralai": "^1.0.4",
|
"@mistralai/mistralai": "^1.0.4",
|
||||||
"@mixedbread-ai/sdk": "^2.2.11",
|
"@mixedbread-ai/sdk": "^2.2.11",
|
||||||
"@pinecone-database/pinecone": "^3.0.2",
|
"@pinecone-database/pinecone": "^3.0.2",
|
||||||
@@ -43,7 +43,6 @@
|
|||||||
"@types/node": "^22.5.1",
|
"@types/node": "^22.5.1",
|
||||||
"@types/papaparse": "^5.3.14",
|
"@types/papaparse": "^5.3.14",
|
||||||
"@types/pg": "^8.11.8",
|
"@types/pg": "^8.11.8",
|
||||||
"@xenova/transformers": "^2.17.2",
|
|
||||||
"@zilliz/milvus2-sdk-node": "^2.4.6",
|
"@zilliz/milvus2-sdk-node": "^2.4.6",
|
||||||
"ajv": "^8.17.1",
|
"ajv": "^8.17.1",
|
||||||
"assemblyai": "^4.7.0",
|
"assemblyai": "^4.7.0",
|
||||||
@@ -91,6 +90,7 @@
|
|||||||
"@notionhq/client": "^2.2.15",
|
"@notionhq/client": "^2.2.15",
|
||||||
"@swc/cli": "^0.4.0",
|
"@swc/cli": "^0.4.0",
|
||||||
"@swc/core": "^1.7.22",
|
"@swc/core": "^1.7.22",
|
||||||
|
"@xenova/transformers": "^2.17.2",
|
||||||
"concurrently": "^8.2.2",
|
"concurrently": "^8.2.2",
|
||||||
"glob": "^11.0.0",
|
"glob": "^11.0.0",
|
||||||
"pg": "^8.12.0",
|
"pg": "^8.12.0",
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import {
|
|||||||
type NodeParser,
|
type NodeParser,
|
||||||
SentenceSplitter,
|
SentenceSplitter,
|
||||||
} from "@llamaindex/core/node-parser";
|
} from "@llamaindex/core/node-parser";
|
||||||
|
import type { LoadTransformerEvent } from "@llamaindex/env";
|
||||||
import { AsyncLocalStorage, getEnv } from "@llamaindex/env";
|
import { AsyncLocalStorage, getEnv } from "@llamaindex/env";
|
||||||
import type { ServiceContext } from "./ServiceContext.js";
|
import type { ServiceContext } from "./ServiceContext.js";
|
||||||
import {
|
import {
|
||||||
@@ -20,6 +21,12 @@ import {
|
|||||||
withEmbeddedModel,
|
withEmbeddedModel,
|
||||||
} from "./internal/settings/EmbedModel.js";
|
} from "./internal/settings/EmbedModel.js";
|
||||||
|
|
||||||
|
declare module "@llamaindex/core/global" {
|
||||||
|
interface LlamaIndexEventMaps {
|
||||||
|
"load-transformers": LoadTransformerEvent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export type PromptConfig = {
|
export type PromptConfig = {
|
||||||
llm?: string;
|
llm?: string;
|
||||||
lang?: string;
|
lang?: string;
|
||||||
|
|||||||
@@ -1,17 +1,26 @@
|
|||||||
import { MultiModalEmbedding } from "@llamaindex/core/embeddings";
|
import { MultiModalEmbedding } from "@llamaindex/core/embeddings";
|
||||||
import type { ImageType } from "@llamaindex/core/schema";
|
import type { ImageType } from "@llamaindex/core/schema";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { lazyLoadTransformers } from "../internal/deps/transformers.js";
|
|
||||||
// only import type, to avoid bundling error
|
// only import type, to avoid bundling error
|
||||||
|
import { loadTransformers } from "@llamaindex/env";
|
||||||
import type {
|
import type {
|
||||||
CLIPTextModelWithProjection,
|
CLIPTextModelWithProjection,
|
||||||
CLIPVisionModelWithProjection,
|
CLIPVisionModelWithProjection,
|
||||||
PreTrainedTokenizer,
|
PreTrainedTokenizer,
|
||||||
Processor,
|
Processor,
|
||||||
} from "@xenova/transformers";
|
} from "@xenova/transformers";
|
||||||
|
import { Settings } from "../Settings.js";
|
||||||
|
|
||||||
async function readImage(input: ImageType) {
|
async function readImage(input: ImageType) {
|
||||||
const { RawImage } = await lazyLoadTransformers();
|
const { RawImage } = await loadTransformers((transformer) => {
|
||||||
|
Settings.callbackManager.dispatchEvent(
|
||||||
|
"load-transformers",
|
||||||
|
{
|
||||||
|
transformer,
|
||||||
|
},
|
||||||
|
true,
|
||||||
|
);
|
||||||
|
});
|
||||||
if (input instanceof Blob) {
|
if (input instanceof Blob) {
|
||||||
return await RawImage.fromBlob(input);
|
return await RawImage.fromBlob(input);
|
||||||
} else if (_.isString(input) || input instanceof URL) {
|
} else if (_.isString(input) || input instanceof URL) {
|
||||||
@@ -40,7 +49,15 @@ export class ClipEmbedding extends MultiModalEmbedding {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getTokenizer() {
|
async getTokenizer() {
|
||||||
const { AutoTokenizer } = await lazyLoadTransformers();
|
const { AutoTokenizer } = await loadTransformers((transformer) => {
|
||||||
|
Settings.callbackManager.dispatchEvent(
|
||||||
|
"load-transformers",
|
||||||
|
{
|
||||||
|
transformer,
|
||||||
|
},
|
||||||
|
true,
|
||||||
|
);
|
||||||
|
});
|
||||||
if (!this.tokenizer) {
|
if (!this.tokenizer) {
|
||||||
this.tokenizer = await AutoTokenizer.from_pretrained(this.modelType);
|
this.tokenizer = await AutoTokenizer.from_pretrained(this.modelType);
|
||||||
}
|
}
|
||||||
@@ -48,7 +65,15 @@ export class ClipEmbedding extends MultiModalEmbedding {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getProcessor() {
|
async getProcessor() {
|
||||||
const { AutoProcessor } = await lazyLoadTransformers();
|
const { AutoProcessor } = await loadTransformers((transformer) => {
|
||||||
|
Settings.callbackManager.dispatchEvent(
|
||||||
|
"load-transformers",
|
||||||
|
{
|
||||||
|
transformer,
|
||||||
|
},
|
||||||
|
true,
|
||||||
|
);
|
||||||
|
});
|
||||||
if (!this.processor) {
|
if (!this.processor) {
|
||||||
this.processor = await AutoProcessor.from_pretrained(this.modelType);
|
this.processor = await AutoProcessor.from_pretrained(this.modelType);
|
||||||
}
|
}
|
||||||
@@ -56,7 +81,17 @@ export class ClipEmbedding extends MultiModalEmbedding {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getVisionModel() {
|
async getVisionModel() {
|
||||||
const { CLIPVisionModelWithProjection } = await lazyLoadTransformers();
|
const { CLIPVisionModelWithProjection } = await loadTransformers(
|
||||||
|
(transformer) => {
|
||||||
|
Settings.callbackManager.dispatchEvent(
|
||||||
|
"load-transformers",
|
||||||
|
{
|
||||||
|
transformer,
|
||||||
|
},
|
||||||
|
true,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
if (!this.visionModel) {
|
if (!this.visionModel) {
|
||||||
this.visionModel = await CLIPVisionModelWithProjection.from_pretrained(
|
this.visionModel = await CLIPVisionModelWithProjection.from_pretrained(
|
||||||
this.modelType,
|
this.modelType,
|
||||||
@@ -67,7 +102,17 @@ export class ClipEmbedding extends MultiModalEmbedding {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getTextModel() {
|
async getTextModel() {
|
||||||
const { CLIPTextModelWithProjection } = await lazyLoadTransformers();
|
const { CLIPTextModelWithProjection } = await loadTransformers(
|
||||||
|
(transformer) => {
|
||||||
|
Settings.callbackManager.dispatchEvent(
|
||||||
|
"load-transformers",
|
||||||
|
{
|
||||||
|
transformer,
|
||||||
|
},
|
||||||
|
true,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
if (!this.textModel) {
|
if (!this.textModel) {
|
||||||
this.textModel = await CLIPTextModelWithProjection.from_pretrained(
|
this.textModel = await CLIPTextModelWithProjection.from_pretrained(
|
||||||
this.modelType,
|
this.modelType,
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { HfInference } from "@huggingface/inference";
|
import { HfInference } from "@huggingface/inference";
|
||||||
import { BaseEmbedding } from "@llamaindex/core/embeddings";
|
import { BaseEmbedding } from "@llamaindex/core/embeddings";
|
||||||
import { lazyLoadTransformers } from "../internal/deps/transformers.js";
|
import { loadTransformers } from "@llamaindex/env";
|
||||||
|
import { Settings } from "../Settings.js";
|
||||||
|
|
||||||
export enum HuggingFaceEmbeddingModelType {
|
export enum HuggingFaceEmbeddingModelType {
|
||||||
XENOVA_ALL_MINILM_L6_V2 = "Xenova/all-MiniLM-L6-v2",
|
XENOVA_ALL_MINILM_L6_V2 = "Xenova/all-MiniLM-L6-v2",
|
||||||
@@ -33,7 +34,15 @@ export class HuggingFaceEmbedding extends BaseEmbedding {
|
|||||||
|
|
||||||
async getExtractor() {
|
async getExtractor() {
|
||||||
if (!this.extractor) {
|
if (!this.extractor) {
|
||||||
const { pipeline } = await lazyLoadTransformers();
|
const { pipeline } = await loadTransformers((transformer) => {
|
||||||
|
Settings.callbackManager.dispatchEvent(
|
||||||
|
"load-transformers",
|
||||||
|
{
|
||||||
|
transformer,
|
||||||
|
},
|
||||||
|
true,
|
||||||
|
);
|
||||||
|
});
|
||||||
this.extractor = await pipeline("feature-extraction", this.modelType, {
|
this.extractor = await pipeline("feature-extraction", this.modelType, {
|
||||||
quantized: this.quantized,
|
quantized: this.quantized,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -9,3 +9,5 @@ export * from "./MixedbreadAIEmbeddings.js";
|
|||||||
export { OllamaEmbedding } from "./OllamaEmbedding.js";
|
export { OllamaEmbedding } from "./OllamaEmbedding.js";
|
||||||
export * from "./OpenAIEmbedding.js";
|
export * from "./OpenAIEmbedding.js";
|
||||||
export { TogetherEmbedding } from "./together.js";
|
export { TogetherEmbedding } from "./together.js";
|
||||||
|
// ClipEmbedding might not work in non-node.js runtime, but it doesn't have side effects
|
||||||
|
export { ClipEmbedding, ClipEmbeddingModelType } from "./ClipEmbedding.js";
|
||||||
|
|||||||
@@ -2,10 +2,6 @@ export * from "./index.edge.js";
|
|||||||
export * from "./readers/index.js";
|
export * from "./readers/index.js";
|
||||||
export * from "./storage/index.js";
|
export * from "./storage/index.js";
|
||||||
// Exports modules that doesn't support non-node.js runtime
|
// Exports modules that doesn't support non-node.js runtime
|
||||||
export {
|
|
||||||
ClipEmbedding,
|
|
||||||
ClipEmbeddingModelType,
|
|
||||||
} from "./embeddings/ClipEmbedding.js";
|
|
||||||
export {
|
export {
|
||||||
HuggingFaceEmbedding,
|
HuggingFaceEmbedding,
|
||||||
HuggingFaceEmbeddingModelType,
|
HuggingFaceEmbeddingModelType,
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
let transformer: typeof import("@xenova/transformers") | null = null;
|
|
||||||
|
|
||||||
export async function lazyLoadTransformers() {
|
|
||||||
if (!transformer) {
|
|
||||||
transformer = await import("@xenova/transformers");
|
|
||||||
}
|
|
||||||
|
|
||||||
// @ts-expect-error
|
|
||||||
if (typeof EdgeRuntime === "string") {
|
|
||||||
// there is no local file system in the edge runtime
|
|
||||||
transformer.env.allowLocalModels = false;
|
|
||||||
}
|
|
||||||
// fixme: handle cloudflare workers case here?
|
|
||||||
return transformer;
|
|
||||||
}
|
|
||||||
@@ -11,12 +11,13 @@ import {
|
|||||||
type ToolCallLLMMessageOptions,
|
type ToolCallLLMMessageOptions,
|
||||||
} from "@llamaindex/core/llms";
|
} from "@llamaindex/core/llms";
|
||||||
import { streamConverter, wrapLLMEvent } from "@llamaindex/core/utils";
|
import { streamConverter, wrapLLMEvent } from "@llamaindex/core/utils";
|
||||||
|
import { loadTransformers } from "@llamaindex/env";
|
||||||
import type {
|
import type {
|
||||||
PreTrainedModel,
|
PreTrainedModel,
|
||||||
PreTrainedTokenizer,
|
PreTrainedTokenizer,
|
||||||
Tensor,
|
Tensor,
|
||||||
} from "@xenova/transformers";
|
} from "@xenova/transformers";
|
||||||
import { lazyLoadTransformers } from "../internal/deps/transformers.js";
|
import { Settings } from "../Settings.js";
|
||||||
|
|
||||||
// TODO workaround issue with @huggingface/inference@2.7.0
|
// TODO workaround issue with @huggingface/inference@2.7.0
|
||||||
interface HfInferenceOptions {
|
interface HfInferenceOptions {
|
||||||
@@ -225,7 +226,15 @@ export class HuggingFaceLLM extends BaseLLM {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getTokenizer() {
|
async getTokenizer() {
|
||||||
const { AutoTokenizer } = await lazyLoadTransformers();
|
const { AutoTokenizer } = await loadTransformers((transformer) => {
|
||||||
|
Settings.callbackManager.dispatchEvent(
|
||||||
|
"load-transformers",
|
||||||
|
{
|
||||||
|
transformer,
|
||||||
|
},
|
||||||
|
true,
|
||||||
|
);
|
||||||
|
});
|
||||||
if (!this.tokenizer) {
|
if (!this.tokenizer) {
|
||||||
this.tokenizer = await AutoTokenizer.from_pretrained(this.tokenizerName);
|
this.tokenizer = await AutoTokenizer.from_pretrained(this.tokenizerName);
|
||||||
}
|
}
|
||||||
@@ -233,7 +242,15 @@ export class HuggingFaceLLM extends BaseLLM {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getModel() {
|
async getModel() {
|
||||||
const { AutoModelForCausalLM } = await lazyLoadTransformers();
|
const { AutoModelForCausalLM } = await loadTransformers((transformer) => {
|
||||||
|
Settings.callbackManager.dispatchEvent(
|
||||||
|
"load-transformers",
|
||||||
|
{
|
||||||
|
transformer,
|
||||||
|
},
|
||||||
|
true,
|
||||||
|
);
|
||||||
|
});
|
||||||
if (!this.model) {
|
if (!this.model) {
|
||||||
this.model = await AutoModelForCausalLM.from_pretrained(this.modelName);
|
this.model = await AutoModelForCausalLM.from_pretrained(this.modelName);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,25 +14,44 @@ import {
|
|||||||
import { escapeLikeString } from "./utils.js";
|
import { escapeLikeString } from "./utils.js";
|
||||||
|
|
||||||
import type { BaseEmbedding } from "@llamaindex/core/embeddings";
|
import type { BaseEmbedding } from "@llamaindex/core/embeddings";
|
||||||
|
import { DEFAULT_COLLECTION } from "@llamaindex/core/global";
|
||||||
import type { BaseNode, Metadata } from "@llamaindex/core/schema";
|
import type { BaseNode, Metadata } from "@llamaindex/core/schema";
|
||||||
import { Document, MetadataMode } from "@llamaindex/core/schema";
|
import { Document, MetadataMode } from "@llamaindex/core/schema";
|
||||||
|
|
||||||
export const PGVECTOR_SCHEMA = "public";
|
export const PGVECTOR_SCHEMA = "public";
|
||||||
export const PGVECTOR_TABLE = "llamaindex_embedding";
|
export const PGVECTOR_TABLE = "llamaindex_embedding";
|
||||||
|
export const DEFAULT_DIMENSIONS = 1536;
|
||||||
|
|
||||||
export type PGVectorStoreConfig = Pick<
|
type PGVectorStoreBaseConfig = {
|
||||||
pg.ClientConfig,
|
|
||||||
"user" | "database" | "password" | "connectionString"
|
|
||||||
> & {
|
|
||||||
schemaName?: string | undefined;
|
schemaName?: string | undefined;
|
||||||
tableName?: string | undefined;
|
tableName?: string | undefined;
|
||||||
dimensions?: number | undefined;
|
dimensions?: number | undefined;
|
||||||
embedModel?: BaseEmbedding | undefined;
|
embedModel?: BaseEmbedding | undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type PGVectorStoreConfig = PGVectorStoreBaseConfig &
|
||||||
|
(
|
||||||
|
| {
|
||||||
|
/**
|
||||||
|
* Client configuration options for the pg client.
|
||||||
|
*
|
||||||
|
* {@link https://node-postgres.com/apis/client#new-client PostgresSQL Client API}
|
||||||
|
*/
|
||||||
|
clientConfig: pg.ClientConfig;
|
||||||
|
}
|
||||||
|
| {
|
||||||
|
/**
|
||||||
|
* A pg client or pool client instance.
|
||||||
|
* If provided, make sure it is not connected to the database yet, or it will throw an error.
|
||||||
|
*/
|
||||||
|
shouldConnect?: boolean | undefined;
|
||||||
|
client: pg.Client | pg.PoolClient;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides support for writing and querying vector data in Postgres.
|
* Provides support for writing and querying vector data in Postgres.
|
||||||
* Note: Can't be used with data created using the Python version of the vector store (https://docs.llamaindex.ai/en/stable/examples/vector_stores/postgres.html)
|
* Note: Can't be used with data created using the Python version of the vector store (https://docs.llamaindex.ai/en/stable/examples/vector_stores/postgres/)
|
||||||
*/
|
*/
|
||||||
export class PGVectorStore
|
export class PGVectorStore
|
||||||
extends VectorStoreBase
|
extends VectorStoreBase
|
||||||
@@ -40,52 +59,26 @@ export class PGVectorStore
|
|||||||
{
|
{
|
||||||
storesText: boolean = true;
|
storesText: boolean = true;
|
||||||
|
|
||||||
private collection: string = "";
|
private collection: string = DEFAULT_COLLECTION;
|
||||||
private schemaName: string = PGVECTOR_SCHEMA;
|
private readonly schemaName: string = PGVECTOR_SCHEMA;
|
||||||
private tableName: string = PGVECTOR_TABLE;
|
private readonly tableName: string = PGVECTOR_TABLE;
|
||||||
|
private readonly dimensions: number = DEFAULT_DIMENSIONS;
|
||||||
|
|
||||||
private user: pg.ClientConfig["user"] | undefined = undefined;
|
private isDBConnected: boolean = false;
|
||||||
private password: pg.ClientConfig["password"] | undefined = undefined;
|
private db: pg.ClientBase | null = null;
|
||||||
private database: pg.ClientConfig["database"] | undefined = undefined;
|
private readonly clientConfig: pg.ClientConfig | null = null;
|
||||||
private connectionString: pg.ClientConfig["connectionString"] | undefined =
|
|
||||||
undefined;
|
|
||||||
|
|
||||||
private dimensions: number = 1536;
|
constructor(config: PGVectorStoreConfig) {
|
||||||
|
super(config?.embedModel);
|
||||||
private db?: pg.ClientBase;
|
this.schemaName = config?.schemaName ?? PGVECTOR_SCHEMA;
|
||||||
|
this.tableName = config?.tableName ?? PGVECTOR_TABLE;
|
||||||
/**
|
this.dimensions = config?.dimensions ?? DEFAULT_DIMENSIONS;
|
||||||
* Constructs a new instance of the PGVectorStore
|
if ("clientConfig" in config) {
|
||||||
*
|
this.clientConfig = config.clientConfig;
|
||||||
* If the `connectionString` is not provided the following env variables are
|
|
||||||
* used to connect to the DB:
|
|
||||||
* PGHOST=your database host
|
|
||||||
* PGUSER=your database user
|
|
||||||
* PGPASSWORD=your database password
|
|
||||||
* PGDATABASE=your database name
|
|
||||||
* PGPORT=your database port
|
|
||||||
*/
|
|
||||||
constructor(configOrClient?: PGVectorStoreConfig | pg.ClientBase) {
|
|
||||||
// We cannot import pg from top level, it might have side effects
|
|
||||||
// so we only check if the config.connect function exists
|
|
||||||
if (
|
|
||||||
configOrClient &&
|
|
||||||
"connect" in configOrClient &&
|
|
||||||
typeof configOrClient.connect === "function"
|
|
||||||
) {
|
|
||||||
const db = configOrClient as pg.ClientBase;
|
|
||||||
super();
|
|
||||||
this.db = db;
|
|
||||||
} else {
|
} else {
|
||||||
const config = configOrClient as PGVectorStoreConfig;
|
this.isDBConnected =
|
||||||
super(config?.embedModel);
|
config.shouldConnect !== undefined ? !config.shouldConnect : false;
|
||||||
this.schemaName = config?.schemaName ?? PGVECTOR_SCHEMA;
|
this.db = config.client;
|
||||||
this.tableName = config?.tableName ?? PGVECTOR_TABLE;
|
|
||||||
this.user = config?.user;
|
|
||||||
this.password = config?.password;
|
|
||||||
this.database = config?.database;
|
|
||||||
this.connectionString = config?.connectionString;
|
|
||||||
this.dimensions = config?.dimensions ?? 1536;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,39 +106,41 @@ export class PGVectorStore
|
|||||||
|
|
||||||
private async getDb(): Promise<pg.ClientBase> {
|
private async getDb(): Promise<pg.ClientBase> {
|
||||||
if (!this.db) {
|
if (!this.db) {
|
||||||
try {
|
const pg = await import("pg");
|
||||||
const pg = await import("pg");
|
const { Client } = pg.default ? pg.default : pg;
|
||||||
const { Client } = pg.default ? pg.default : pg;
|
|
||||||
|
|
||||||
const { registerType } = await import("pgvector/pg");
|
const { registerTypes } = await import("pgvector/pg");
|
||||||
// Create DB connection
|
// Create DB connection
|
||||||
// Read connection params from env - see comment block above
|
// Read connection params from env - see comment block above
|
||||||
const db = new Client({
|
const db = new Client({
|
||||||
user: this.user,
|
...this.clientConfig,
|
||||||
password: this.password,
|
});
|
||||||
database: this.database,
|
|
||||||
connectionString: this.connectionString,
|
|
||||||
});
|
|
||||||
await db.connect();
|
|
||||||
|
|
||||||
// Check vector extension
|
await db.connect();
|
||||||
await db.query("CREATE EXTENSION IF NOT EXISTS vector");
|
this.isDBConnected = true;
|
||||||
await registerType(db);
|
|
||||||
|
|
||||||
// All good? Keep the connection reference
|
// Check vector extension
|
||||||
this.db = db;
|
await db.query("CREATE EXTENSION IF NOT EXISTS vector");
|
||||||
} catch (err) {
|
await registerTypes(db);
|
||||||
console.error(err);
|
|
||||||
return Promise.reject(err instanceof Error ? err : new Error(`${err}`));
|
// All good? Keep the connection reference
|
||||||
}
|
this.db = db;
|
||||||
}
|
}
|
||||||
|
|
||||||
const db = this.db;
|
if (this.db && !this.isDBConnected) {
|
||||||
|
await this.db.connect();
|
||||||
|
this.isDBConnected = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.db.on("end", () => {
|
||||||
|
// Connection closed
|
||||||
|
this.isDBConnected = false;
|
||||||
|
});
|
||||||
|
|
||||||
// Check schema, table(s), index(es)
|
// Check schema, table(s), index(es)
|
||||||
await this.checkSchema(db);
|
await this.checkSchema(this.db);
|
||||||
|
|
||||||
return Promise.resolve(this.db);
|
return this.db;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async checkSchema(db: pg.ClientBase) {
|
private async checkSchema(db: pg.ClientBase) {
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
# @llamaindex/groq
|
# @llamaindex/groq
|
||||||
|
|
||||||
|
## 0.0.5
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b48bcc3]
|
||||||
|
- @llamaindex/env@0.1.12
|
||||||
|
- @llamaindex/openai@0.1.6
|
||||||
|
|
||||||
## 0.0.4
|
## 0.0.4
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/groq",
|
"name": "@llamaindex/groq",
|
||||||
"description": "Groq Adapter for LlamaIndex",
|
"description": "Groq Adapter for LlamaIndex",
|
||||||
"version": "0.0.4",
|
"version": "0.0.5",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
# @llamaindex/openai
|
# @llamaindex/openai
|
||||||
|
|
||||||
|
## 0.1.6
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b48bcc3]
|
||||||
|
- @llamaindex/core@0.2.4
|
||||||
|
- @llamaindex/env@0.1.12
|
||||||
|
|
||||||
## 0.1.5
|
## 0.1.5
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/openai",
|
"name": "@llamaindex/openai",
|
||||||
"description": "OpenAI Adapter for LlamaIndex",
|
"description": "OpenAI Adapter for LlamaIndex",
|
||||||
"version": "0.1.5",
|
"version": "0.1.6",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
|
|||||||
Generated
+15
-45
@@ -167,7 +167,7 @@ importers:
|
|||||||
version: link:../packages/llamaindex
|
version: link:../packages/llamaindex
|
||||||
mongodb:
|
mongodb:
|
||||||
specifier: ^6.7.0
|
specifier: ^6.7.0
|
||||||
version: 6.8.0(@aws-sdk/credential-providers@3.650.0(@aws-sdk/client-sso-oidc@3.650.0(@aws-sdk/client-sts@3.650.0)))
|
version: 6.8.0(@aws-sdk/credential-providers@3.650.0)
|
||||||
pathe:
|
pathe:
|
||||||
specifier: ^1.1.2
|
specifier: ^1.1.2
|
||||||
version: 1.1.2
|
version: 1.1.2
|
||||||
@@ -425,18 +425,12 @@ importers:
|
|||||||
|
|
||||||
packages/env:
|
packages/env:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/lodash':
|
|
||||||
specifier: ^4.17.7
|
|
||||||
version: 4.17.7
|
|
||||||
'@types/node':
|
'@types/node':
|
||||||
specifier: ^22.5.1
|
specifier: ^22.5.1
|
||||||
version: 22.5.4
|
version: 22.5.4
|
||||||
js-tiktoken:
|
js-tiktoken:
|
||||||
specifier: ^1.0.12
|
specifier: ^1.0.12
|
||||||
version: 1.0.14
|
version: 1.0.14
|
||||||
tiktoken:
|
|
||||||
specifier: ^1.0.15
|
|
||||||
version: 1.0.16
|
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@aws-crypto/sha256-js':
|
'@aws-crypto/sha256-js':
|
||||||
specifier: ^5.2.0
|
specifier: ^5.2.0
|
||||||
@@ -447,12 +441,18 @@ importers:
|
|||||||
'@swc/core':
|
'@swc/core':
|
||||||
specifier: ^1.7.22
|
specifier: ^1.7.22
|
||||||
version: 1.7.22(@swc/helpers@0.5.13)
|
version: 1.7.22(@swc/helpers@0.5.13)
|
||||||
|
'@xenova/transformers':
|
||||||
|
specifier: ^2.17.2
|
||||||
|
version: 2.17.2
|
||||||
concurrently:
|
concurrently:
|
||||||
specifier: ^8.2.2
|
specifier: ^8.2.2
|
||||||
version: 8.2.2
|
version: 8.2.2
|
||||||
pathe:
|
pathe:
|
||||||
specifier: ^1.1.2
|
specifier: ^1.1.2
|
||||||
version: 1.1.2
|
version: 1.1.2
|
||||||
|
tiktoken:
|
||||||
|
specifier: ^1.0.16
|
||||||
|
version: 1.0.16
|
||||||
vitest:
|
vitest:
|
||||||
specifier: ^2.0.5
|
specifier: ^2.0.5
|
||||||
version: 2.1.1(@edge-runtime/vm@4.0.3)(@types/node@22.5.4)(happy-dom@15.7.4)(msw@2.4.8(typescript@5.6.2))(terser@5.32.0)
|
version: 2.1.1(@edge-runtime/vm@4.0.3)(@types/node@22.5.4)(happy-dom@15.7.4)(msw@2.4.8(typescript@5.6.2))(terser@5.32.0)
|
||||||
@@ -565,9 +565,6 @@ importers:
|
|||||||
'@types/pg':
|
'@types/pg':
|
||||||
specifier: ^8.11.8
|
specifier: ^8.11.8
|
||||||
version: 8.11.8
|
version: 8.11.8
|
||||||
'@xenova/transformers':
|
|
||||||
specifier: ^2.17.2
|
|
||||||
version: 2.17.2
|
|
||||||
'@zilliz/milvus2-sdk-node':
|
'@zilliz/milvus2-sdk-node':
|
||||||
specifier: ^2.4.6
|
specifier: ^2.4.6
|
||||||
version: 2.4.6
|
version: 2.4.6
|
||||||
@@ -606,7 +603,7 @@ importers:
|
|||||||
version: 2.0.0
|
version: 2.0.0
|
||||||
mongodb:
|
mongodb:
|
||||||
specifier: ^6.7.0
|
specifier: ^6.7.0
|
||||||
version: 6.8.0(@aws-sdk/credential-providers@3.650.0(@aws-sdk/client-sso-oidc@3.650.0(@aws-sdk/client-sts@3.650.0)))
|
version: 6.8.0(@aws-sdk/credential-providers@3.650.0)
|
||||||
notion-md-crawler:
|
notion-md-crawler:
|
||||||
specifier: ^1.0.0
|
specifier: ^1.0.0
|
||||||
version: 1.0.0(encoding@0.1.13)
|
version: 1.0.0(encoding@0.1.13)
|
||||||
@@ -656,6 +653,9 @@ importers:
|
|||||||
'@swc/core':
|
'@swc/core':
|
||||||
specifier: ^1.7.22
|
specifier: ^1.7.22
|
||||||
version: 1.7.22(@swc/helpers@0.5.13)
|
version: 1.7.22(@swc/helpers@0.5.13)
|
||||||
|
'@xenova/transformers':
|
||||||
|
specifier: ^2.17.2
|
||||||
|
version: 2.17.2
|
||||||
concurrently:
|
concurrently:
|
||||||
specifier: ^8.2.2
|
specifier: ^8.2.2
|
||||||
version: 8.2.2
|
version: 8.2.2
|
||||||
@@ -18506,7 +18506,7 @@ snapshots:
|
|||||||
'@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.6.2)
|
'@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.6.2)
|
||||||
eslint: 8.57.0
|
eslint: 8.57.0
|
||||||
eslint-import-resolver-node: 0.3.9
|
eslint-import-resolver-node: 0.3.9
|
||||||
eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0)
|
eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0)
|
||||||
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0)
|
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0)
|
||||||
eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0)
|
eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0)
|
||||||
eslint-plugin-react: 7.35.0(eslint@8.57.0)
|
eslint-plugin-react: 7.35.0(eslint@8.57.0)
|
||||||
@@ -18554,25 +18554,6 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0):
|
|
||||||
dependencies:
|
|
||||||
'@nolyfill/is-core-module': 1.0.39
|
|
||||||
debug: 4.3.7
|
|
||||||
enhanced-resolve: 5.17.1
|
|
||||||
eslint: 8.57.0
|
|
||||||
eslint-module-utils: 2.8.2(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0)
|
|
||||||
fast-glob: 3.3.2
|
|
||||||
get-tsconfig: 4.8.0
|
|
||||||
is-bun-module: 1.1.0
|
|
||||||
is-glob: 4.0.3
|
|
||||||
optionalDependencies:
|
|
||||||
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0)
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- '@typescript-eslint/parser'
|
|
||||||
- eslint-import-resolver-node
|
|
||||||
- eslint-import-resolver-webpack
|
|
||||||
- supports-color
|
|
||||||
|
|
||||||
eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0):
|
eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@nolyfill/is-core-module': 1.0.39
|
'@nolyfill/is-core-module': 1.0.39
|
||||||
@@ -18585,24 +18566,13 @@ snapshots:
|
|||||||
is-bun-module: 1.1.0
|
is-bun-module: 1.1.0
|
||||||
is-glob: 4.0.3
|
is-glob: 4.0.3
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0)
|
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@8.5.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@typescript-eslint/parser'
|
- '@typescript-eslint/parser'
|
||||||
- eslint-import-resolver-node
|
- eslint-import-resolver-node
|
||||||
- eslint-import-resolver-webpack
|
- eslint-import-resolver-webpack
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
eslint-module-utils@2.8.2(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0):
|
|
||||||
dependencies:
|
|
||||||
debug: 3.2.7
|
|
||||||
optionalDependencies:
|
|
||||||
'@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.6.2)
|
|
||||||
eslint: 8.57.0
|
|
||||||
eslint-import-resolver-node: 0.3.9
|
|
||||||
eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0)
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- supports-color
|
|
||||||
|
|
||||||
eslint-module-utils@2.8.2(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0):
|
eslint-module-utils@2.8.2(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 3.2.7
|
debug: 3.2.7
|
||||||
@@ -18624,7 +18594,7 @@ snapshots:
|
|||||||
doctrine: 2.1.0
|
doctrine: 2.1.0
|
||||||
eslint: 8.57.0
|
eslint: 8.57.0
|
||||||
eslint-import-resolver-node: 0.3.9
|
eslint-import-resolver-node: 0.3.9
|
||||||
eslint-module-utils: 2.8.2(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0)
|
eslint-module-utils: 2.8.2(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0)
|
||||||
hasown: 2.0.2
|
hasown: 2.0.2
|
||||||
is-core-module: 2.15.1
|
is-core-module: 2.15.1
|
||||||
is-glob: 4.0.3
|
is-glob: 4.0.3
|
||||||
@@ -21357,7 +21327,7 @@ snapshots:
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@aws-sdk/credential-providers': 3.650.0(@aws-sdk/client-sso-oidc@3.650.0(@aws-sdk/client-sts@3.650.0))
|
'@aws-sdk/credential-providers': 3.650.0(@aws-sdk/client-sso-oidc@3.650.0(@aws-sdk/client-sts@3.650.0))
|
||||||
|
|
||||||
mongodb@6.8.0(@aws-sdk/credential-providers@3.650.0(@aws-sdk/client-sso-oidc@3.650.0(@aws-sdk/client-sts@3.650.0))):
|
mongodb@6.8.0(@aws-sdk/credential-providers@3.650.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@mongodb-js/saslprep': 1.1.7
|
'@mongodb-js/saslprep': 1.1.7
|
||||||
bson: 6.8.0
|
bson: 6.8.0
|
||||||
|
|||||||
Reference in New Issue
Block a user