updated qdrant

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
Francisco Javier Arceo 2025-06-25 09:57:02 -04:00
parent fa36b672f1
commit 0cc625560d
4 changed files with 3 additions and 12 deletions

View file

@ -11296,9 +11296,6 @@
}
},
"additionalProperties": false,
"required": [
"chunk_id"
],
"title": "ChunkMetadata",
"description": "`ChunkMetadata` is backend metadata for a `Chunk` that is used to store additional information about the chunk that will not be used in the context during inference, but is required for backend functionality. The `ChunkMetadata` is set during chunk creation in `MemoryToolRuntimeImpl().insert()`and is not expected to change after. Use `Chunk.metadata` for metadata that will be used in the context during inference."
},

View file

@ -7960,8 +7960,6 @@ components:
description: >-
The number of tokens in the metadata of the chunk.
additionalProperties: false
required:
- chunk_id
title: ChunkMetadata
description: >-
`ChunkMetadata` is backend metadata for a `Chunk` that is used to store additional

View file

@ -41,7 +41,7 @@ class ChunkMetadata(BaseModel):
:param metadata_token_count: The number of tokens in the metadata of the chunk.
"""
chunk_id: str = None
chunk_id: str | None = None
document_id: str | None = None
source: str | None = None
created_timestamp: int | None = None

View file

@ -71,12 +71,8 @@ class QdrantIndex(EmbeddingIndex):
)
points = []
for i, (chunk, embedding) in enumerate(zip(chunks, embeddings, strict=False)):
chunk_id = (
f"{chunk.metadata.get('document_id')}:chunk-{i}"
if chunk.metadata
else f"{chunk.chunk_metadata.document_id}:chunk-{i}"
)
for _i, (chunk, embedding) in enumerate(zip(chunks, embeddings, strict=False)):
chunk_id = chunk.chunk_id
points.append(
PointStruct(
id=convert_id(chunk_id),