mirror of
https://github.com/run-llama/LlamaIndexTS.git
synced 2026-07-18 16:44:33 -04:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 313071e9cd | |||
| 5f6782038a | |||
| fe08d0451b |
@@ -1,5 +1,13 @@
|
|||||||
# docs
|
# docs
|
||||||
|
|
||||||
|
## 0.0.87
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [5f67820]
|
||||||
|
- Updated dependencies [fe08d04]
|
||||||
|
- llamaindex@0.6.18
|
||||||
|
|
||||||
## 0.0.86
|
## 0.0.86
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "docs",
|
"name": "docs",
|
||||||
"version": "0.0.86",
|
"version": "0.0.87",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docusaurus": "docusaurus",
|
"docusaurus": "docusaurus",
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
# @llamaindex/autotool
|
# @llamaindex/autotool
|
||||||
|
|
||||||
|
## 3.0.18
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [5f67820]
|
||||||
|
- Updated dependencies [fe08d04]
|
||||||
|
- llamaindex@0.6.18
|
||||||
|
|
||||||
## 3.0.17
|
## 3.0.17
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
# @llamaindex/autotool-01-node-example
|
# @llamaindex/autotool-01-node-example
|
||||||
|
|
||||||
|
## 0.0.27
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [5f67820]
|
||||||
|
- Updated dependencies [fe08d04]
|
||||||
|
- llamaindex@0.6.18
|
||||||
|
- @llamaindex/autotool@3.0.18
|
||||||
|
|
||||||
## 0.0.26
|
## 0.0.26
|
||||||
|
|
||||||
### 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.26"
|
"version": "0.0.27"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
# @llamaindex/autotool-02-next-example
|
# @llamaindex/autotool-02-next-example
|
||||||
|
|
||||||
|
## 0.1.71
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [5f67820]
|
||||||
|
- Updated dependencies [fe08d04]
|
||||||
|
- llamaindex@0.6.18
|
||||||
|
- @llamaindex/autotool@3.0.18
|
||||||
|
|
||||||
## 0.1.70
|
## 0.1.70
|
||||||
|
|
||||||
### 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.70",
|
"version": "0.1.71",
|
||||||
"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.17",
|
"version": "3.0.18",
|
||||||
"description": "auto transpile your JS function to LLM Agent compatible",
|
"description": "auto transpile your JS function to LLM Agent compatible",
|
||||||
"files": [
|
"files": [
|
||||||
"dist",
|
"dist",
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
# @llamaindex/cloud
|
# @llamaindex/cloud
|
||||||
|
|
||||||
|
## 0.2.14
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [5f67820]
|
||||||
|
- @llamaindex/core@0.2.12
|
||||||
|
|
||||||
## 0.2.13
|
## 0.2.13
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/cloud",
|
"name": "@llamaindex/cloud",
|
||||||
"version": "0.2.13",
|
"version": "0.2.14",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
# @llamaindex/community
|
# @llamaindex/community
|
||||||
|
|
||||||
|
## 0.0.47
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [5f67820]
|
||||||
|
- @llamaindex/core@0.2.12
|
||||||
|
|
||||||
## 0.0.46
|
## 0.0.46
|
||||||
|
|
||||||
### 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.46",
|
"version": "0.0.47",
|
||||||
"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,11 @@
|
|||||||
# @llamaindex/core
|
# @llamaindex/core
|
||||||
|
|
||||||
|
## 0.2.12
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 5f67820: Fix that node parsers generate nodes with UUIDs
|
||||||
|
|
||||||
## 0.2.11
|
## 0.2.11
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/core",
|
"name": "@llamaindex/core",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.2.11",
|
"version": "0.2.12",
|
||||||
"description": "LlamaIndex Core Module",
|
"description": "LlamaIndex Core Module",
|
||||||
"exports": {
|
"exports": {
|
||||||
"./agent": {
|
"./agent": {
|
||||||
|
|||||||
@@ -479,7 +479,7 @@ export function buildNodeFromSplits(
|
|||||||
) {
|
) {
|
||||||
const imageDoc = doc as ImageNode;
|
const imageDoc = doc as ImageNode;
|
||||||
const imageNode = new ImageNode({
|
const imageNode = new ImageNode({
|
||||||
id_: imageDoc.id_ ?? idGenerator(i, imageDoc),
|
id_: idGenerator(i, imageDoc),
|
||||||
text: textChunk,
|
text: textChunk,
|
||||||
image: imageDoc.image,
|
image: imageDoc.image,
|
||||||
embedding: imageDoc.embedding,
|
embedding: imageDoc.embedding,
|
||||||
@@ -496,7 +496,7 @@ export function buildNodeFromSplits(
|
|||||||
) {
|
) {
|
||||||
const textDoc = doc as TextNode;
|
const textDoc = doc as TextNode;
|
||||||
const node = new TextNode({
|
const node = new TextNode({
|
||||||
id_: textDoc.id_ ?? idGenerator(i, textDoc),
|
id_: idGenerator(i, textDoc),
|
||||||
text: textChunk,
|
text: textChunk,
|
||||||
embedding: textDoc.embedding,
|
embedding: textDoc.embedding,
|
||||||
excludedEmbedMetadataKeys: [...textDoc.excludedEmbedMetadataKeys],
|
excludedEmbedMetadataKeys: [...textDoc.excludedEmbedMetadataKeys],
|
||||||
|
|||||||
@@ -80,4 +80,3 @@ export {
|
|||||||
} from "./llms";
|
} from "./llms";
|
||||||
|
|
||||||
export { objectEntries } from "./object-entries";
|
export { objectEntries } from "./object-entries";
|
||||||
export { UUIDFromString } from "./uuid";
|
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
import { createSHA256 } from "@llamaindex/env";
|
|
||||||
|
|
||||||
export function UUIDFromString(input: string) {
|
|
||||||
const hashFunction = createSHA256();
|
|
||||||
hashFunction.update(input);
|
|
||||||
const base64Hash = hashFunction.digest();
|
|
||||||
|
|
||||||
// Convert base64 to hex
|
|
||||||
const hexHash = Buffer.from(base64Hash, "base64").toString("hex");
|
|
||||||
|
|
||||||
// Format the hash to resemble a UUID (version 5 style)
|
|
||||||
const uuid = [
|
|
||||||
hexHash.substring(0, 8),
|
|
||||||
hexHash.substring(8, 12),
|
|
||||||
"5" + hexHash.substring(12, 15), // Set the version to 5 (name-based)
|
|
||||||
((parseInt(hexHash.substring(15, 17), 16) & 0x3f) | 0x80).toString(16) +
|
|
||||||
hexHash.substring(17, 19), // Set the variant
|
|
||||||
hexHash.substring(19, 31),
|
|
||||||
].join("-");
|
|
||||||
|
|
||||||
return uuid;
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
import { UUIDFromString } from "@llamaindex/core/utils";
|
|
||||||
import { describe, expect, it } from "vitest";
|
|
||||||
|
|
||||||
const UUID_REGEX =
|
|
||||||
/^[0-9a-f]{8}-[0-9a-f]{4}-5[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
||||||
|
|
||||||
describe("UUIDFromString", () => {
|
|
||||||
it("should convert string to UUID", () => {
|
|
||||||
const string = "document_id_1";
|
|
||||||
const result = UUIDFromString(string);
|
|
||||||
expect(result).toBeDefined();
|
|
||||||
expect(result).toMatch(UUID_REGEX);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("should return the same UUID for the same input string", () => {
|
|
||||||
const string = "document_id_1";
|
|
||||||
const result1 = UUIDFromString(string);
|
|
||||||
const result2 = UUIDFromString(string);
|
|
||||||
expect(result1).toEqual(result2);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("should return the different UUID for different input strings", () => {
|
|
||||||
const string1 = "document_id_1";
|
|
||||||
const string2 = "document_id_2";
|
|
||||||
const result1 = UUIDFromString(string1);
|
|
||||||
const result2 = UUIDFromString(string2);
|
|
||||||
expect(result1).not.toEqual(result2);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("should handle case-sensitive input strings", () => {
|
|
||||||
const string1 = "document_id_1";
|
|
||||||
const string2 = "Document_Id_1";
|
|
||||||
const result1 = UUIDFromString(string1);
|
|
||||||
const result2 = UUIDFromString(string2);
|
|
||||||
expect(result1).not.toEqual(result2);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,5 +1,13 @@
|
|||||||
# @llamaindex/experimental
|
# @llamaindex/experimental
|
||||||
|
|
||||||
|
## 0.0.96
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [5f67820]
|
||||||
|
- Updated dependencies [fe08d04]
|
||||||
|
- llamaindex@0.6.18
|
||||||
|
|
||||||
## 0.0.95
|
## 0.0.95
|
||||||
|
|
||||||
### 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.95",
|
"version": "0.0.96",
|
||||||
"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,18 @@
|
|||||||
# llamaindex
|
# llamaindex
|
||||||
|
|
||||||
|
## 0.6.18
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 5f67820: Fix that node parsers generate nodes with UUIDs
|
||||||
|
- fe08d04: Fix LlamaCloud retrieval with multiple pipelines
|
||||||
|
- Updated dependencies [5f67820]
|
||||||
|
- @llamaindex/core@0.2.12
|
||||||
|
- @llamaindex/cloud@0.2.14
|
||||||
|
- @llamaindex/ollama@0.0.7
|
||||||
|
- @llamaindex/openai@0.1.15
|
||||||
|
- @llamaindex/groq@0.0.14
|
||||||
|
|
||||||
## 0.6.17
|
## 0.6.17
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
# @llamaindex/cloudflare-worker-agent-test
|
# @llamaindex/cloudflare-worker-agent-test
|
||||||
|
|
||||||
|
## 0.0.80
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [5f67820]
|
||||||
|
- Updated dependencies [fe08d04]
|
||||||
|
- llamaindex@0.6.18
|
||||||
|
|
||||||
## 0.0.79
|
## 0.0.79
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/cloudflare-worker-agent-test",
|
"name": "@llamaindex/cloudflare-worker-agent-test",
|
||||||
"version": "0.0.79",
|
"version": "0.0.80",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# @llamaindex/llama-parse-browser-test
|
# @llamaindex/llama-parse-browser-test
|
||||||
|
|
||||||
|
## 0.0.10
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- @llamaindex/cloud@0.2.14
|
||||||
|
|
||||||
## 0.0.9
|
## 0.0.9
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/llama-parse-browser-test",
|
"name": "@llamaindex/llama-parse-browser-test",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.9",
|
"version": "0.0.10",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
# @llamaindex/next-agent-test
|
# @llamaindex/next-agent-test
|
||||||
|
|
||||||
|
## 0.1.80
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [5f67820]
|
||||||
|
- Updated dependencies [fe08d04]
|
||||||
|
- llamaindex@0.6.18
|
||||||
|
|
||||||
## 0.1.79
|
## 0.1.79
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/next-agent-test",
|
"name": "@llamaindex/next-agent-test",
|
||||||
"version": "0.1.79",
|
"version": "0.1.80",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
# test-edge-runtime
|
# test-edge-runtime
|
||||||
|
|
||||||
|
## 0.1.79
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [5f67820]
|
||||||
|
- Updated dependencies [fe08d04]
|
||||||
|
- llamaindex@0.6.18
|
||||||
|
|
||||||
## 0.1.78
|
## 0.1.78
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/nextjs-edge-runtime-test",
|
"name": "@llamaindex/nextjs-edge-runtime-test",
|
||||||
"version": "0.1.78",
|
"version": "0.1.79",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
# @llamaindex/next-node-runtime
|
# @llamaindex/next-node-runtime
|
||||||
|
|
||||||
|
## 0.0.61
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [5f67820]
|
||||||
|
- Updated dependencies [fe08d04]
|
||||||
|
- llamaindex@0.6.18
|
||||||
|
|
||||||
## 0.0.60
|
## 0.0.60
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/next-node-runtime-test",
|
"name": "@llamaindex/next-node-runtime-test",
|
||||||
"version": "0.0.60",
|
"version": "0.0.61",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
# @llamaindex/waku-query-engine-test
|
# @llamaindex/waku-query-engine-test
|
||||||
|
|
||||||
|
## 0.0.80
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [5f67820]
|
||||||
|
- Updated dependencies [fe08d04]
|
||||||
|
- llamaindex@0.6.18
|
||||||
|
|
||||||
## 0.0.79
|
## 0.0.79
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/waku-query-engine-test",
|
"name": "@llamaindex/waku-query-engine-test",
|
||||||
"version": "0.0.79",
|
"version": "0.0.80",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "llamaindex",
|
"name": "llamaindex",
|
||||||
"version": "0.6.17",
|
"version": "0.6.18",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export class LlamaCloudRetriever extends BaseRetriever {
|
|||||||
await PipelinesService.searchPipelinesApiV1PipelinesGet({
|
await PipelinesService.searchPipelinesApiV1PipelinesGet({
|
||||||
query: {
|
query: {
|
||||||
project_id: await getProjectId(this.projectName, this.organizationId),
|
project_id: await getProjectId(this.projectName, this.organizationId),
|
||||||
project_name: this.pipelineName,
|
pipeline_name: this.pipelineName,
|
||||||
},
|
},
|
||||||
throwOnError: true,
|
throwOnError: true,
|
||||||
});
|
});
|
||||||
@@ -72,25 +72,11 @@ export class LlamaCloudRetriever extends BaseRetriever {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { data: pipeline } =
|
|
||||||
await PipelinesService.getPipelineApiV1PipelinesPipelineIdGet({
|
|
||||||
path: {
|
|
||||||
pipeline_id: pipelines[0]!.id,
|
|
||||||
},
|
|
||||||
throwOnError: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!pipeline) {
|
|
||||||
throw new Error(
|
|
||||||
`No pipeline found with name ${this.pipelineName} in project ${this.projectName}`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const { data: results } =
|
const { data: results } =
|
||||||
await PipelinesService.runSearchApiV1PipelinesPipelineIdRetrievePost({
|
await PipelinesService.runSearchApiV1PipelinesPipelineIdRetrievePost({
|
||||||
throwOnError: true,
|
throwOnError: true,
|
||||||
path: {
|
path: {
|
||||||
pipeline_id: pipeline.id,
|
pipeline_id: pipelines[0]!.id,
|
||||||
},
|
},
|
||||||
body: {
|
body: {
|
||||||
...this.retrieveParams,
|
...this.retrieveParams,
|
||||||
|
|||||||
@@ -40,9 +40,9 @@ export async function getProjectId(
|
|||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
const { data: projects } = await ProjectsService.listProjectsApiV1ProjectsGet(
|
const { data: projects } = await ProjectsService.listProjectsApiV1ProjectsGet(
|
||||||
{
|
{
|
||||||
path: {
|
query: {
|
||||||
project_name: projectName,
|
project_name: projectName,
|
||||||
organization_id: organizationId,
|
organization_id: organizationId ?? null,
|
||||||
},
|
},
|
||||||
throwOnError: true,
|
throwOnError: true,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import {
|
|||||||
type VectorStoreQueryResult,
|
type VectorStoreQueryResult,
|
||||||
} from "./types.js";
|
} from "./types.js";
|
||||||
|
|
||||||
import { UUIDFromString } from "@llamaindex/core/utils";
|
|
||||||
import type { QdrantClientParams, Schemas } from "@qdrant/js-client-rest";
|
import type { QdrantClientParams, Schemas } from "@qdrant/js-client-rest";
|
||||||
import { QdrantClient } from "@qdrant/js-client-rest";
|
import { QdrantClient } from "@qdrant/js-client-rest";
|
||||||
import { metadataDictToNode, nodeToMetadata } from "./utils.js";
|
import { metadataDictToNode, nodeToMetadata } from "./utils.js";
|
||||||
@@ -171,7 +170,7 @@ export class QdrantVectorStore
|
|||||||
|
|
||||||
for (let k = 0; k < nodeIds.length; k++) {
|
for (let k = 0; k < nodeIds.length; k++) {
|
||||||
const point: PointStruct = {
|
const point: PointStruct = {
|
||||||
id: UUIDFromString(nodeIds[k]!.id_),
|
id: nodeIds[k]!.id_,
|
||||||
payload: payloads[k]!,
|
payload: payloads[k]!,
|
||||||
vector: vectors[k]!,
|
vector: vectors[k]!,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ describe("VectorStoreIndex", () => {
|
|||||||
runs: number = 2,
|
runs: number = 2,
|
||||||
): Promise<Array<number>> => {
|
): Promise<Array<number>> => {
|
||||||
const documents = [new Document({ text: "lorem ipsem", id_: "1" })];
|
const documents = [new Document({ text: "lorem ipsem", id_: "1" })];
|
||||||
const entries: number[] = [];
|
const entries = [];
|
||||||
for (let i = 0; i < runs; i++) {
|
for (let i = 0; i < runs; i++) {
|
||||||
await VectorStoreIndex.fromDocuments(documents, {
|
await VectorStoreIndex.fromDocuments(documents, {
|
||||||
serviceContext,
|
serviceContext,
|
||||||
@@ -43,7 +43,7 @@ describe("VectorStoreIndex", () => {
|
|||||||
|
|
||||||
test("fromDocuments stores duplicates without a doc store strategy", async () => {
|
test("fromDocuments stores duplicates without a doc store strategy", async () => {
|
||||||
const entries = await testStrategy(DocStoreStrategy.NONE);
|
const entries = await testStrategy(DocStoreStrategy.NONE);
|
||||||
expect(entries[0]).toBe(entries[1]);
|
expect(entries[0]! + 1).toBe(entries[1]);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("fromDocuments ignores duplicates with upserts doc store strategy", async () => {
|
test("fromDocuments ignores duplicates with upserts doc store strategy", async () => {
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# @llamaindex/groq
|
# @llamaindex/groq
|
||||||
|
|
||||||
|
## 0.0.14
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- @llamaindex/openai@0.1.15
|
||||||
|
|
||||||
## 0.0.13
|
## 0.0.13
|
||||||
|
|
||||||
### 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.13",
|
"version": "0.0.14",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
# @llamaindex/ollama
|
# @llamaindex/ollama
|
||||||
|
|
||||||
|
## 0.0.7
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [5f67820]
|
||||||
|
- @llamaindex/core@0.2.12
|
||||||
|
|
||||||
## 0.0.6
|
## 0.0.6
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/ollama",
|
"name": "@llamaindex/ollama",
|
||||||
"description": "Ollama Adapter for LlamaIndex",
|
"description": "Ollama Adapter for LlamaIndex",
|
||||||
"version": "0.0.6",
|
"version": "0.0.7",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
# @llamaindex/openai
|
# @llamaindex/openai
|
||||||
|
|
||||||
|
## 0.1.15
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [5f67820]
|
||||||
|
- @llamaindex/core@0.2.12
|
||||||
|
|
||||||
## 0.1.14
|
## 0.1.14
|
||||||
|
|
||||||
### 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.14",
|
"version": "0.1.15",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user